limit of portal records
I just need to make a script that sets a limit to how many records i can add to my portal without using a button.
I have made the following script:
If [ Count ( Knit MeasurementsTemplate::Type template ID_FK ) ≥ 8 ]
Show Custom Dialog [ Title: "No enough space"; Message: "No more space for meassurements";
Default Button: “CANCEL”, Commit: “Yes” ]
Set Variable [ $TechID; Value:Knit Measurement Type Templates::Id ]
Go to Layout [ “KNIT Measurement temp” (Knit MeasurementsTemplate) ]
Set Field [ Knit MeasurementsTemplate::Type template ID_FK; $TechID ]
Go to Layout [ original layout ]
I just don't know hoe to add this script to my portal so it only adds a record to the portal if I'm in the last empty portal row..? I tried to add the script as a script trigger in my text field but couldn't find a suitable scrip trigger. Does anyone have any good advise to solve this..?