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.

Is it possible to edit Request variables in servicenow Mobile Agent Catalog task record screen ?

anushad
Tera Expert

Requirement is to allow the agent to Edit Request variables (ones in the variable editor) that are auto-populated when a catalog task created by workflow in Mobile agent Catalog task Record screen.
I was to able to display the variables in the Catalog task Record screen under Details Screen segment. How can I edit those fields. 

anushad_0-1706278303099.pnganushad_1-1706278362773.png

anushad_2-1706280660830.png

 



1 REPLY 1

SHJ
Tera Contributor

You can create functions/action items which can help you with this. Your action item needs to be a scripted update. 

 

With the input screen you have already created, add sys_id of the Catalog task. 

var gr_sc_task = new GlideRecord('sc_task');
gr_sc_task.get(parm_variable.sys_id);

 

Your variables are attached to your RITM/Catalog task and then you can save any value to your variables like this,

gr_sc_task.variables.xxxx = parm_variable.xxxx; 

gr_sc_task.variables.xxxx.update();

 

Regards,

SHJ.