Insert record in "sysapproval_approver" table

varadharaj_a
Kilo Contributor

Hi,

I have a requirement to add a record in "sysapproval_approver" table, to show in "My approval" page.

Can I have a guidance from anybody?

thanks

Guru

7 REPLIES 7

I haven't worked with contract table but does it have an existing workflow ?


Yes, there is "Contract Approval" workflow. I guess, it execute the "Approval / Reject" process of existing record in the "sysapproval" table. Please correct me if I am wrong.



thanks


Guru


warren_chan
ServiceNow Employee
ServiceNow Employee

I was wondering how to do this via script. Figured out what the mandatory fields are.



var approval_gr = new GlideRecord('sysapproval_approver');


approval_gr.initialize();


approval_gr.state = 'not requested';


approval_gr.approver = '46ca0887a9fe19810191e08e51927ebf';


approval_gr.sysapproval = '776022addb7aa600cb5772fc0f961900';


approval_gr.source_table = 'change_request';


approval_gr.document_id = '776022addb7aa600cb5772fc0f961900';


approval_gr.insert();