- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
I have duplicated the OTB edit ui action and
new GlideRecord(current.getTableName())).canCreate() && RP.isManyToMany() && !RP.getListControl().isOmitEditButton() && current.getTablename()!='u_service_option'; This is not working
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
So you are on Service Option form and Subscribers is related list table
Then why not use Configure List Control and Hide the Edit button from there?
Why to override OOTB UI action?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @YashasM ,
There are some issues in your code.
There was an extra closing bracket in the
GlideRecordstatement.getTablename()was used instead of the correct case-sensitive methodgetTableName().
Corrected code
new GlideRecord(current.getTableName()).canCreate() && RP.isManyToMany() && !RP.getListControl().isOmitEditButton() && current.getTableName()!='u_service_option';
If this works Please mark it as helpful and Accept this solution..
Best Regards,
SIVASANKARI S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
This is not working , The thing is I need to exclude the edit option from u_service_option(custom table) Because we have introduced different approach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Since there are many ui actions named 'edit', try temporarily renaming your duplicated one to ensure it is the one showing on this particular table/related list. Once you are sure you are modifying the correct UI Action, what is the use case for not showing the edit button - where / on which view of your custom table do you now see and don't want to see this button?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
are you sure you duplicated the correct one?
share some screenshots.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader

