Business Rule - Invalid Insert - HELP

Carter1
Giga Guru

Hi all,

I have a business rule on my custom table u_itfm_forecast. This business rule creates a unique condition by concatenating 3 fields together. However, this business rule is causing some challenge when I insert records into this table. I am getting an error message "invalid insert" when submitting a new record. However, this record still gets created and I can see it in the list view with the unique condition created.

I know this business rule is causing the "Invalid insert" message because when I make it inactive, the error message does not appear. When creating a new record, all of the fields (cost  center, gl account, and vendor) are filled in in the form.

find_real_file.png

Does anybody know why this business rule is causing the invalid insert message to pop up? I've tried everything and nothing has resolved it. I isolated the problem to this business rule so I know it is causing the issue.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I could see you are dot walking 2 times for u_cost_center

Is that fine?

Can you try using that only once?

Do you have any other before insert BR which is aborting the record creation?

by any chance are you setting the abort action checkbox as true under the Actions tab for this BR

Can you share the BR condition?

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I could see you are dot walking 2 times for u_cost_center

Is that fine?

Can you try using that only once?

Do you have any other before insert BR which is aborting the record creation?

by any chance are you setting the abort action checkbox as true under the Actions tab for this BR

Can you share the BR condition?

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I guess I wasn't thinking about other before insert business rules preventing this. I changed one of them to after and it works now!! Thanks so much.

You are welcome.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hitoshi Ozawa
Giga Sage
Giga Sage

Is there any reference field in your table? If so, check if you're passing sys_id instead of a value.

If you're using a script and inserting to the reference table, you'll need to check if the record already exists in the referenced table.