Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Creating new related records in a portal related to a parent record that is locked.


This topic is 6977 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have set up a Orders Tracking database which enables vendors to create an modify records on both files (Orders, Items)until a field (Invoice Nr)is filled up, thus locking that particular record and the Items in the portal. Vendors are still able to create new records and modify those that have an empty field "Invoice Nr". So far so good, if not for the fact that they can create new records in the portal. Is there something like a Portal Property that lets you create new records conditionally ?

Posted

You can create portals conditionally via script. To stop portal records from being created when user clicks on the "open" portal row, set up your relationship by making sure that the option for "Allow creation of related records via this relationship" is UNCHECKED. This will allow you to set up a conditional script for creating the related records.

if [isempty (Invoice Nr)]

Custom Dialog ["You must first..."]

//here you can give the user the option toinput the required fields using the "input Fiedl" tab in the custom dialog window. If you use the nput field, you will have to use another if statement to check what the user decided to do, ie, if (get (lastmessagechoice) = 2 exit script else perform another script step etc...

Exit script []

Else

Go to Layout []

New record

Set Field [invoiceID; get (scriptparameter)]

Go to related record

Go to portal row [last]

End if

This topic is 6977 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.