Business rule should execute only if incident created from Record Producer

Saranya2
Tera Contributor

Hi All,

 

I have a before insert BR to populate affected company and location field based on caller, this BR should run only if  incident is created from Record Producer, Can anyone please suggest?

 

Thanks,

Saranya

2 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Saranya2 

 

If a incident created via RP, then contact is populated Self Servcie, if that can be a fixed parameter for you then it is good to put in BR

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

If you prefer not to create a new field, you can include a specific format in either the short description or the description field, like this: "Description: [Actual description]" Then, in the business rule, you can set a condition to trigger when the description starts with "Description". If you want this rule to apply only to record producers, you'll need to add additional conditions to check for that context.

 

OR 

 

you can utilize the "contact_type" field on the incident form, set it as "self service" , when you submitted it from the record producer and add a condition in the business rule for the same.

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

View solution in original post

5 REPLIES 5

Jim Bland
Tera Contributor

If the code only needs to run upon the insertion of the incident, then place the code to populate those fields in the script field of the record producer. The code runs upon submission, and you can set any field on the incident. In the information block above the script field, it even states that you can use the script to 'dynamically assign values to specific fields on the generated record.' 
To set the fields is using 'current' so you probably could copy and paste the BR and it would just work.