business rules is not working without current.update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 02:06 AM
insert and update business rule not working without current.update syntax in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 07:24 AM
WHy cant you do the same in a Before BR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 10:21 PM
We tried this method also, but we are getting below error while we are performing update set scan activity on this BR.
Error: remove current.update line from BR
We tried the things as per ServiceNow suggested KB article also, but functionality is not working as expected.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715782
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2024 01:24 AM
You don't need current.update when you use before BR, you can just comment that one line and leave rest as is, it will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2024 01:35 AM
Hi @krishnaredd ,
No need to use current.update(); in Business Rule for before -Insert/update the current record.
so, to update the current record field then
first check the condition then,
current.field_name=' update the value'; // backend value to the variable or create a sys_properties hardcode value there and call , and assign to the current field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 10:41 PM
Instead of using current.update(), you can directly use current.setValue() to modify fields in the current record.
current.setValue('field_name', 'value');
This avoids the need for current.update() and achieves the required result while preventing potential recursion or performance issues.