July 14, 20169 yr Environment: FM13 with FM13 Server, mix of Windows 7 and 10. Is there a way to set a script trigger on if this portal row is new? IE, a script to run if this new child/portal record is new. We have a parent record, and portal to Children records. The children records have 2 fields: Profile Name and Process type. Our user would like to enter a new child record (profile name and process type). if the process type already exists, we will need to archive the existing record (matching the profile type). There is more bI want to start with this first. I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals. Any ideas on how to handle this? Or am I going to have to add a button to go to another screen to accomplish this? Thanks. I hope i gave enough info for you to help me.
July 14, 20169 yr I would probably not allow direct editing of the portal - rather, I would have a plus button that launches either a new little window or a popover where the data is entered, and can be handled when a Done button or whatever is used....
July 14, 20169 yr Author Thanks for your input. The editing directly into the portal was requested by the user, which is why I am investigating. But your way is definitely doable.
August 4, 20169 yr On 14.7.2016 at 8:56 PM, Scott Pon said: I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals. Any ideas on how to handle this? Or am I going to have to add a button to go to another screen to accomplish this? You can put a script trigger to the field in portal. One possibility would be to add "OnObjectValidate" trigger. With one field in portal script can check if ID of the current portal record is empty. But if there are two fields in the portal "Profile" and "Process", you have to have additional logic, because ID is not anymore empty if Profile-field has been filled and user continues to the Process-field (record is created). You could put another script trigger into the first field to check if the ID is empty and keep track of its ID by creating a global variable after committing the portal record (go to next field and then set the global variable of id). On the second field (Process) trigger the script that does the business logic and empties the global variable that was set on the first field's script.
Create an account or sign in to comment