6 Replies Latest reply on Sep 6, 2012 8:22 AM by sfmoore2000

    OnRecordLoad

    sfmoore2000

      I have a script that runs fine when I run it on its on, but when I attach it to onrecordload I get nothing. I placed a portal onto a layout and when I select a record in the portal it is supposed to set the field ID to the selected item and then have another set of records pull from the selection. The issue is that the script is not firing at all. Am I doing something wrong.......

        • 1. Re: OnRecordLoad
          gsokolsky

          sfmoore2000 wrote:

           

          I have a script that runs fine when I run it on its on, but when I attach it to onrecordload I get nothing.  I placed a portal onto a layout and when I select a record in the portal it is supposed to set the field ID to the selected item and then have another set of records pull from the selection.  The issue is that the script is not firing at all.  Am I doing something wrong.......

           

          I think your problem lies in your script trigger type.  Selecting a field through a portal would happen after the record is loaded therefore your script runs before you have selected the field so it doesn't do anything.

           

          You may look into the script trigger at the field level instead of the record level.

           

          Does that help?

          • 2. Re: OnRecordLoad
            wimdecorte

            I'm pretty sure that "on record load" does not fire when you select a record in a portal.  The simple solution would be to make one of the fields in the portal a regular button that runs your script.

            • 3. Re: OnRecordLoad
              flukey

              Use the OnObjectEnter trigger of the portal to run the script every time the new portal record is selected.  You will also need to run the script once OnRecordLoad to initially set it to the first portal record for the new record.  Remember OnRecordLoad fires when the layout loads and as you go from record to record in the layout's TO, not as you select diferent records in the portal.

              • 4. Re: OnRecordLoad
                sfmoore2000

                Thank You, It worked

                • 5. Re: OnRecordLoad
                  sfmoore2000

                  Thanks for the reply, this is very good solution

                  • 6. Re: OnRecordLoad
                    sfmoore2000

                    Yes it does, thanks you for the help