Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

I want to hide UI Action related link on form

MayurChaudhari
Tera Contributor

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 -

MayurChaudhari_0-1761637396039.png

 

Current UI Action-

MayurChaudhari_1-1761637476962.png

Please help me with the solution.

 

Thank You!

 

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@MayurChaudhari 

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! 🙏

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

@MayurChaudhari 

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! 🙏

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

prerna_sh
Giga Sage
Giga Sage

Hi @MayurChaudhari 

you should use current.sys_class_nameinstead 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

Sarthak Kashyap
Mega Sage

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).

SarthakKashyap_0-1761648410584.png

 

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak