Edit Button on related list

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 07:35 AM
Hello together
Maybe someone here can explain me the logic of the edit button in a one 2 many OOB related list (have read x articles about it but definitely don't understand it).
I have added the related list "Change Request Parent" in the table change_request and as admin I see the edit button. In the list control there is no check mark on "omnit edit button".
Now when I call the related list as ITIL user, the edit button is missing.
If I now go via System UI - UI Actions and look there at the Edit Button in the Table "global", it has a Condtion: (new GlideRecord(current.getTableName())).canWrite() && RP.isOneToMany() && !RP.getListControl().isOmitEditButton()
If I remove this, the edit button is also visible for the ITIL users BUT in all related lists.
The goal is to keep the condition and have the edit button in the OOB Related List "Change Request Parent" for the ITIL users (we want to make a one 2 many relation here to create dependencies to other changes).
Thanks for support
Greetings
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 02:22 PM
Are you adding this Related List to the Change Request form, or a different one? I'm guessing if you remove this from the condition, the ITIL users will see the Edit button:
current.getTableName())).canWrite() &&
So then the question is why can't ITIL users write to the change_request table, or can they? If you just can't crack that you can view the original UI Action, change the Table to change_request, then Insert and Stay to create a new record that will only apply to OTM Related Lists on the change_request table. On this new record then you can remove the canWrite part of the condition, or whatever you determine to be the culprit.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 11:36 PM
Hi Brad
Thanks for your reply.
Yes, i'm adding the related list on the Change Request form and when i remove the condition, the ITIL users see the "Edit" button. But, the also see the "Edit" Button on other related Lists.
ITIL Users have permission to write in the change_request table and i still don't understand, why i can't present the button diectely and have to modify the global one.
Your idea with a copy of the OOB button is great and i stop now searching and everything with the copy is working fine.
Thanks for the hint and regards
Alex