how to Set field value in reference field using BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 11:50 PM
Hi,
How to set reference field value using Business rule?
I have 2 fields on a custom table
u_id-String
UserRef-reference to sys_user
I want Business rule code that when u_id is filled or updated it should go glide record using u_id field to match UserId in sys_user table and that record should be updated in UserRef

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 01:43 AM
You are correct, if the record is missing, then that will be an issue.
Business rules that run after, will happen almost instantly after the record has been created. And before the next record (possibly the manager record) has been created.
In that case you could create an onComplete transform script, that tries to match the manager record after all records has been imported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 01:48 AM
I have never used it so can you help with it in detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 06:37 AM
Hi @OlaN
I have never used it so can you help with it in detail

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 10:53 AM
You can learn on how to do transform scripts by checking the Developer site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2022 12:05 AM
Hi,
should be simple enough. What did you try so far?
Why Business rule? you can use flow designer as well with no code.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader