Display reference field value into string fields

Kishore8
Kilo Guru

My script is not working:

var one = current.u_group.getDisplayValue();

var gr=new GlideRecord('sysapproval_approver');

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

gr.query();

if(gr.next())

{

gr.u_kb_group=one;

gr.update();

}

find_real_file.png

25 REPLIES 25

In that case, my example should work. Give it a try and let us know!


i have tried your example,,



it is effected but problem is here, when update the Approve record (approved/rejected) that time only it is firing,



i just requesting here-   when Approver   is created immdiatly should reflect


I'm not sure I'm understanding what your explaining (although I think you may want to have the business rule fire only on "insert", in my screenshot I left both insert and update checked).



The process should go something like this:



1. KB Article is written, with the "Group" field populated.


2. KB Article is requested to be published.


3. Approvals are inserted. Business Rule runs, populating the field on the approval with the display value from the knowledge article.



Is this the expected process? If so, what is the issue you're experiencing?


Hi ,



find_real_file.png





find_real_file.png





find_real_file.png






find_real_file.png


Can you change your BR to before insert, and increase the BR Order to 1000 and try.


find_real_file.png


find_real_file.png




I have tested and it worked with this setup.


find_real_file.png



Approver:


find_real_file.png