Show only ‘New’ button on the ‘Task’ related list, show it only to caller and 'itil' role user.

Tejas16
Tera Contributor

Show only ‘New’ button on the ‘Task’ related list, show it only to caller and "itil" role
user in the "in progress" state and do not show ‘Edit’ button on incident form.

 

How we can do above scenario?

Is it possible using List Control->omit new Condition?

1 ACCEPTED SOLUTION

@Tejas16 

1) right click List control in related list

In the omit new condition script add this

give the correct field name for caller from parent form

if(parent.callerField == gs.getUserID() && gs.hasRole('itil'))
	answer = false;
else
	answer = true;

Similarly add script for Omit edit as per your requirement

AnkurBawiskar_0-1673357500193.png

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Tejas16 

should be easily achieved using Omit Edit condition script

on which form you are showing the related list? share screenshots

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

I am trying this scenario in Scoped Application

Show only ‘New’ button on the ‘Training Task’ related list, show it only to requester and training
admin in the ‘Draft’ state and do not show ‘Edit’ button.

@Tejas16 

Does the training task related list table have any field which refers to the Parent table?

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

There is no field in training task table which is refering to Parent table.