Override Business Rule in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 01:23 AM
I've created a flow where I'm tying to update the value of a field. What I'm currently trying to do is:
However, what I've noticed is that if I raise a request with the flow, the following occurs:
Does anyone what I can do to override business rules from running so that my flow can run without any issues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 04:33 AM
You are trying to change logic, so you need to change the entire logic. That business rule is there for a reason. It is making sure that the current logic works and you are not running into any issues in the process.
Check what the BR is doing and when (probably you are setting a value and this BR is on before, checking some data). The date on the record is validated and because you it is validated as that you can not update the record, your error will exist until you either set a correct date through your flow as well, or make sure the date isn't validated by changing the trigger of the BR.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2024 09:07 AM
Hi @matthew_hughes ,
Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 04:21 PM
Not sure if you found a solution to your question, however, one option is to create an action containing a script step that you can call from a Flow to update the record without running the business rule.
This example is based on a use case i had:
- Create Flow Action
- Create 3 inputs:
- Add a Lookup Record step. Pass in the Table input variable, and script the condition to get the record based on RecordSysId input variable:
- Add a Script step
var fieldValue = JSON.parse(JSON.parse('"' + inputs.fieldvalue + '"'));
for (var key in fieldValue) {
inputs.record.setValue([key], fieldValue[key]);
}
inputs.record.setWorkflow(false);
inputs.record.update();
- Save/Publish Action
You can then use this action in a Flow and pass the Table name, sysId of the record to update, and the field name/values to update: