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.

How to update ctask once created

Km Sh
Tera Contributor

Hi

How to update description of Change request - CTASKs after it created.
For ex: I have couple of CTASKs got created & need to update the description based on short_description.

 

tes1.png

Appreciate your inputs. Thanks

5 REPLIES 5

Km Sh
Tera Contributor

@Sandeep Rajput 

actually I need to update all the CTASK descriptions, if it matches to short description i.e.; MACD Devices:

for ex: Ctask1, Ctask2, Ctask3...

 var text1 = "MACD Devices: xyz hello";
 var str = current.getValue('short_description');
    if (str.indexOf("text1") > -1) {
        current.setValue('description', text);
       }

Is this correct or missing something..