How to fetch value from Document ID field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 10:30 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 10:39 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 10:45 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 11:00 AM
It is on esg services table