Need to update WorkNotes

Indup
Tera Expert

Hi all,

I am creating a request from inbound action. Also i am calling a workflow from it. In that workflow, after begin activity i have created a catalog task activity. After that activity some custom activity is there. Once that custom activity completes, i want catalog task work notes to be updated . How can i do this?

I tried with:   Begin --> Catalog task activity --> Custom activity ---> Run script ---> End

 

 

Run script:

var gr = new GlideRecord('sc_task');
gr.addQuery('request',current.number);
gs.log("current sys id is "+current.sys_id);
gr.query();
if(gr.next())
{
gr.work_notes = "abc123";
gr.update();

}

But not updating the catalog task work notes. 

Can some one help me here

 

Regards,

Indup

9 REPLIES 9

Hi,

It's been a bit since my reply was posted. I just wanted to check-in and see how things are going.

If my reply helped guide you correctly, please mark it as Helpful & Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Indup ,

It's been a bit since my reply was posted. I just wanted to check-in and see how things are going.

If my reply helped guide you correctly, please mark it as Helpful & Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hello @Indup ,

I just wanted to check-in on this.

If my reply above helped guide you correctly, please mark that reply as Helpful & Correct.

Thank you!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Akshata jamdar
Mega Guru

Hi indup,

 

In your script just make one change in addQuery you have mentioned request and current.number but it will not work there is no field as request on sc_task. you can update work not by using sys_id in addQuery("sys_id",workflow.scratchpad.taskID);

 

Please mark the answer correct and helpful if it will resolved your query.

 

Regards,

Akshata

Hello,

I'm not sure what you're talking about as they wouldn't have set workflow.scratchpad.taskID to anything until they read my post....and I've already covered that above and it's apparent you read my post as well. So I'm unsure as to your point here...

Thanks


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!