Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OnRecordLoad - infinite loop

Featured Replies

I have a script to get some values upon loading a Record. However, within the script are a few Find()commands. Is there a way to stop the trigger from going when ever the script finds a record?

I just want it to load a record, run the script, find the records grab the values required and come back to the original record.

Currently instead it loads a record, runs the script, finds a record, runs the script again, etc...

Thanks B)

You haven't really told us much about the problem, however it might be worth trying to use a relationship to get the values rather than Find steps.

Alternatively, when the record is first loaded and the script first runs, set the record id into a global variable. Then get the script to check the variable to see if it's already been processed.

  • Author

Thanks Vaughan, I've been there and tried that.. and relationships just don't seem to cut it for what I need to do.

I've managed to get around this problem of an infinite loop by enclosing the script inside an If statement, where are particular global variable ($$AllowFamilySetup = "").

Then just before the script does it's finding, i.e. switching records, I tell it to change $$AllowFamilySetup = "No". Then at the end of the script I reset $$AllowFamilySetup = "".

This doesn't stop the script from triggering everytime, but does stop the script from executing the finds before it's had a chance to finish what it started.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.