I have a after saving flow and I am using update triggering record directly option to update the fields.
Is it good to have this option for after save flow for every decision like below? Because we have multiple update operation in one flow.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI have seen this is the kind of decision element being used almost most of the places. Though visually it may look same but it will become more complex when the flow grows.
Also you can look above in apex something like this.
if(Some Decision){
} else {
if(Some Decision){
} else {
if(Some Decision){
} else {
if(Some Decision){
} else {
}
}
}
}
Which is very bad in terms of good coding practice.
In my view you should go with this kind of decision boxes.
Which in apex will look like this.
if (Some Decision) {
} else if (Some Decision) {
} else if (Some Decision) {
} else if (Some Decision) {
} else {
}
Which will be more readable and easy to understand.
NOTE : And name your default outcomes and decision boxes properly, so that it is identifiable what decision it should take.