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

Drop down field in a portal not going to correct related record

Featured Replies

Hi all, I hope you can help.

 

I have a drop down field in a portal with a value list attached, the value list is a number of different written functions, for example "Set Priority", "Set Normal" , "Delete"... there is a script trigger set to 'OnObjectModify'.

 

The idea is rather than have many different buttons in the portal for these different functions I want the user to select a function from a drop down, and based on their choice, the script trigger carries out the requested task.

 

But everytime I request a task from the dropdown, it always goes to the first record in the portal, despite the 'Go to Related Record, Match Current Record only' setting being turned on.

 

Below image link shows my script trigger on the portal dropdown... so you can see the first If statement checks to see if the field 'action_select' (the drop down field) is set to "Set Primary"if so it sets another field in the same table to a 'Yes' value and resets the dropdown field to "Action >" but this is'nt happening as it doesn't go to the correct record.

 

The flush Cache and refresh window steps are to ensure the portal refeshes properly when we come back to the original layout, so you can see the changes.

 

script.png

 

 

 

  • Author

I have just discovered my script works as required but only if the drop down is a 'pop up list' and not a 'drop down list'.... why is this?

Add an extra step or two. On filed entry, collect the portal row number to a global field. Then on the on exit field, add go to portal row where it is the value of that global field. Alternately use a variable instead of storing the portal row in a global. That should keep your portal from losing focus. I generally have a script go to a field to make sure I am in the right portal, then go to a portal row, then do something.

Hth

Create an account or sign in to comment

Important Information

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

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.