controlling the Creation of Change Task under Change Request

Manohararuna
Tera Contributor

Hello Everyone,

 

        Here i have one Requirement. Here i have Change request having option Approval and Change Task options in related list.

     Approval option having Requested, and Change Task having New and Edit options. New option is in disable state Until to approve the all Request.

    For this i want solution .

Manohararuna_0-1749449234226.pngManohararuna_1-1749449302107.png

 

Thanks,

Dwaram Manohar Reddy.

1 ACCEPTED SOLUTION

@Manohararuna 

Did you get a chance to check the approach I shared 3hours ago?

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

View solution in original post

8 REPLIES 8

@Manohararuna 

Did you get a chance to check the approach I shared 3hours ago?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Manohararuna 

You can configure list control on that related list and add script in "Omit new condition" field

Steps

1) Configure -> List Control

AnkurBawiskar_0-1749450166003.png

 

2) Add this script, enhance it as per your requirement

I am querying to check if CHG is approved or not

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval", parent.sys_id);
gr.addQuery("state", "approved");
gr.query();
answer = !gr.hasNext(); // if not approved then omit i.e. answer = true 

AnkurBawiskar_1-1749450434439.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

snehareddym
Tera Expert

 

snehareddym_2-1749463724564.pngsnehareddym_3-1749463738775.png

Out of Box in List controls on the change_request table ...'omit new button' and 'omit edit button' are checked(not visible) to make them visible we need to uncheck the List Contol on change_request.

Hello Sneha,

 

       Hello Sneha,

           Because of you point of view New button is not visible in all conditions. But i want to visible the New button on Change Task when the Change request State and approval estate changed

like from Approval value as Requested and state value Approval to Approval fields value Approved and state field value In-Progress state

 

Thanks, 

D Manohar Reddy