AnsweredAssumed Answered

limit of portal records

Question asked by hanstrager on May 25, 2014
Latest reply on Jun 2, 2014 by philmodjunk


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 ]
     Freeze Window
     Go to Layout [ “KNIT Measurement temp” (Knit MeasurementsTemplate) ]
     New Record/Request
     Set Field [ Knit MeasurementsTemplate::Type template ID_FK; $TechID ]
     Go to Layout [ original layout ]
     End If

     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..?