Update business rule works but insert does not on sc_request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 01:10 AM - edited ‎07-02-2025 01:12 AM
Hi Community,
I have a requirement in which we have to populate a field owning system which is a reference field on task and is on user table and sc_request form so I had to populate that in owning system on sc_request based on requested_for user's owning system but it was updating opened by's owning system when the business rule was before insert but the moment I checked update also it started working what I mean it is now updating requested_for's owning system after selecting update could someone tell me why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 01:41 AM
unless you share the business rule scripts and screenshots, we can't help much.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 03:03 AM
The part of code I highlighted works only when the business rule has update and does not work when only insert is selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 03:25 AM
may be during insert requested_for is not populated
Did you check by adding logs and see?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 04:06 AM
@Ankur Bawiskar
Yes I did add logs and check and before insert its retrieving the sys_id of user who is in opened_by field of the request as well as the u_owned_system sys_id is of the company of the opened_by user. After changing it to before insert and update it is showing the right sys_id which are expected.