Get RITM number in worflow

Brian Lancaster
Tera Sage

Is there a way RITM number to use in a script during the workflow?     I know its available in the workflow as I can use it in a mail script during the workflow.

1 ACCEPTED SOLUTION

akt_snow
Giga Expert

Hi Brian,



The field name that you are referring to is incorrect. The label is Approval for but field name is 'sysapproval'



try using the below code instead, it will work.



var gr = new GlideRecord('sysapproval_approver');


gr.addQuery('sysapproval', current.sys_id);


gr.addQuery('state', 'approved');


gr.query();



If this resolves the issue, then please mark it answered and close the thread.



Thanks,


Avneet


View solution in original post

10 REPLIES 10

akt_snow
Giga Expert

Hi Brian,



The field name that you are referring to is incorrect. The label is Approval for but field name is 'sysapproval'



try using the below code instead, it will work.



var gr = new GlideRecord('sysapproval_approver');


gr.addQuery('sysapproval', current.sys_id);


gr.addQuery('state', 'approved');


gr.query();



If this resolves the issue, then please mark it answered and close the thread.



Thanks,


Avneet