[List V2 only] When a form has a related list of the parent table, UI actions called on the form can inadvertently select another UI action defined on that table. i.e list UI action.
This occurs when a few prerequisites are met:
- Related lists are in List V2 mode
- Tabbed forms are set to load "After the form loads"
- The UI action belonging to the form has the same method name as the UI action belonging to the list
- The form also needs to have a related list of the parent table list
Steps to Reproduce
Turn off List V3 for related lists.
Enable Tabbed Forms and set Related List Loading to "After the form loads".
Upload the following two attached XML files:
UI_action_fire.xml, which adds a Form Button called "Fire" to the incident form. This UI action uses the SameName() method to log "Fire" to the browser console.
UI_action_water.xml, which adds a List Context Menu called "Water" to the incident list. This UI action will use the SameName() method to log "Water" to the browser console.
Go to the incident list and open a record.
Configure the form view's Related List layout to include "Incident > Parent" and save.
Open the browser console via dev tools.
On the record form, click the Form button "Fire"
Instead of the console logging "Fire" when the Fire UI Action is triggered, the console logs "Water" .
Use one of the following workarounds:
- Change the UI Action method names so they are not the same.
- Enable List V3 for related lists.
Related Problem: PRB1190425