We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

I need to hide "edit" ui action from one table

YashasM
Tera Contributor

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 

4 REPLIES 4

sivasankaris
Tera Guru

Hi @YashasM ,

There are some issues in your code.

 

  • There was an extra closing bracket in the GlideRecord statement.

  • getTablename() was used instead of the correct case-sensitive method getTableName().

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

 

 

 

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

Brad Bowman
Kilo Patron

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?

Ankur Bawiskar
Tera Patron

@YashasM 

are you sure you duplicated the correct one?

share some screenshots.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader