- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 02:48 AM
I want to create a business rule that works when creating a record.
I want to stop creating a record if the value I put in the corresponding field of the record is a specific value.
How should this be implemented?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 02:55 AM
I want to create a business rule that works when creating a record.
Business rule with Insert: True on required table
I want to stop creating a record if the value I put in the corresponding field of the record is a specific value.
In the same Business Rule you need to check
if(current.field_name1=='aBC')//Replace field_name1 with correct field & ABC with required value
{
current.setAbortAction(true); //aborts action
}
else {
//do nothing & let record get created or your logic
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 02:55 AM
I want to create a business rule that works when creating a record.
Business rule with Insert: True on required table
I want to stop creating a record if the value I put in the corresponding field of the record is a specific value.
In the same Business Rule you need to check
if(current.field_name1=='aBC')//Replace field_name1 with correct field & ABC with required value
{
current.setAbortAction(true); //aborts action
}
else {
//do nothing & let record get created or your logic
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 03:15 AM
Hi @盆巣
For point#I want to create a business rule that works when creating a record:
For point#I want to stop creating a record if the value I put in the corresponding field of the record is a specific value
Step1:
Step2:
Please mark my answer as correct if this solves your issues!
If it helped you in any way then please mark helpful!
Thanks and regards,
Kartik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 03:30 AM
Hi,
so what script did you write and where are you stuck?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader