How to fetch value from Document ID field

Emeley
Giga Contributor

I am trying to fetch the value of a Document ID field  in after business rule but the script is not able to fetch the value of only Document ID field.

 

var unique = current.getUniqueValue();
var expenses = new GlideRecord('fm_expense_line');
var sc = expenses.get('source_id');

 

I used this script but not able to fetch the values of Source ID field

6 REPLIES 6

Prince Arora
Tera Sage
Tera Sage

@Emeley ,

 

Can you try this:

var unique = current.getUniqueValue();
var expenses = new GlideRecord('fm_expense_line');
expenses.get(unique);

var sc = expenses.source_id;

 


If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

It should fetch the value of the source_id which is document ID field and it should compare that value to the unique value we are fetching in the first statement 

@Emeley ,

 

Your business rule is executing on which table?

@Prince Arora 

It is on esg services table