I want to hide UI Action related link on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I want to hide 'Create Task Action' link from the 'u_deal_desk_tasks' custom form, but i am not able to do that,
I have added following conditions in UI Action Condition -
current.getTableName() != 'deal_desk_task' ,
!(current.getTableName() == 'u_deal_desk_tasks'),
g_form.getTableName() != 'u_deal_desk_tasks',
Use all of the above conditions but not work.
Need to hide this -
Current UI Action-
Please help me with the solution.
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
is your table "u_deal_desk_tasks" extending some task table?
If yes then seems your table got this UI action from parent table
If you want to hide then do this
1) go to that OOTB UI action
2) change the Table to your table u_deal_desk_tasks and Do "Insert and Stay" from Right Click Form Header, ensure Action name is same
3) then in the new UI action mark that as Active=false
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hope you are doing good.
Did my reply answer your question?
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @MayurChaudhari
you should use current.sys_class_name, instead of " current.getTableName()".
Also, the "condition" field of a UI action is always evaluated on the server-side, so g_form will not work https://www.servicenow.com/community/developer-forum/client-callable-ui-actions-conditions-g-form-or...
Please go through:
https://www.servicenow.com/community/developer-forum/question-regarding-ui-actions-on-extended-table...
And please let me know, if it solves your query.
-------------------------------------------------------------------------------------------------------------------------------------------
If my response solves your query, please marked helpful by selecting accept as Solution and Helpful. Let me know if anything else is required.
Thanks,
Prerna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @MayurChaudhari ,
I tried your problem in my PDI and it is working fine for me please try with below condition
current.getRecordClassName()!='u_deal_desk_tasks'; (Your table name).
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
