How to populate value in a field on approval table from workflow?

thirumala2
Tera Guru

Hi ,

We have a requirement of populating value from workflow to a given field on approval table for managed docs .

find_real_file.png

From the below workflow run script :

find_real_file.png

@shloke04 can u help ?

 

1 ACCEPTED SOLUTION

By mistake I have put a quotes while setting the value. You need to remove that:

Modified script below:

var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('document_id',current.sys_id);
gr.query();
while(gr.next()){
gr.FIELDNAME = current.number.toString(); // Replace "FIELDNAME " with the one where you want to set on Approver table
gr.update();
}

Try now should work.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

36 REPLIES 36

Prasad Pagar
Mega Sage

Hi @thirumala 

Did you tried any script already which is not working?

Thank you
Prasad

Hi Prasad ,

Yes kind of which shloke added but no luck .

Can you show your current script?

find_real_file.png

ignore the inverted commas in current .number those I have removed .