How to Populate short description field value of any custom table to any field of approval record.

Suyash Joshi
Tera Contributor

Hello Everyone,

While working on workflow I was stuck.

I need two requirement to fulfilled :-

1. How to generate Approved request while submitting the record, when I was submitting my it was Requested!

2. I have an custom table in which a field name is u_short_description I want to mapped the field to corresponding to any field in the approval record (Inside the sysapproval_approve record).

 

Thanks and Regards,

Suyash

9 REPLIES 9

Hello @Suyash Joshi,

 

Can you send the screenshot of your workflow activity configuration?

 

Thanks!

I have an another requirement which I completed earlier for any user or group approval so I use approval user too.

Hello @Suyash Joshi,

 

As you have use the 'Approval - User' activity in your workflow, so that's why it is setting the Approval status is 'Requested'. It is waiting for the approval to be approved.

 

Please refer to below screenshot to update the workflow.

Workflow.png

 

If the above solution resolve your issue, please mark the solution as 'Accepted Solution' and also mark it as 'Helpful'.

 

Thank you!

Prathamesh.

Hello @Prathamesh G 

Can you check the GlideRecord query?

 

var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sys_id','88ba7a2297dbb550a976358e6253af04');(sysid of custom table)
gr.query();
while(gr.next()){
gr.u_short_description = current.u_short_description;
}
gr.update();

Hi your script should be like below:

var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('document_id','88ba7a2297dbb550a976358e6253af04'); // you can use current.sys_id to make it dynamic in your workflow
gr.query();
while(gr.next()){
gr.u_short_description = current.u_short_description;
}
gr.update();

 

If your requirement is to update approval record with sys_id as soon as it is inserted/created then create Business Rule and update short description from the Approving record.

Make sure to put correct when to run condition so that it will only run for your custom table.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande