When i retrieve this flow from ANT tool and try to deploy in other environment its giving error saying " Error : Invalid element reference not found for target.
@salesforcebreak Andy - based on this Cautionary Tale of using the Custom Error messages in Flow, do you have any guidance or best practices on how to avoid this issue? Perhaps trying to consolidate any Custom Error messages into a single Flow if used for "validation" purposes? I would appreciate any thoughts you may have on the subject. ~ Thanks!
There are several UI pitfalls with this at the moment. Some are: 1) When you use a custom error message on the back of a record change that can be done via a path component, the message appears on top in red and disappears. You cannot control where and how it appears. 2) The messages appear in sequence. Before save, after save, and validation rules don't show up at the same time. I built many fault paths for a client and connected them to the custom error message element. They said they ended up removing all, because they wanted to see the messages by other automations/code/validations, but they could not when this design was active. I heard a few other complaints but I cannot remember all of them. I think in the future we will be able to do all this inside flow rather than inside validation rules, but we are not there yet. For now, it would be best if you could build all such errors into validations before save flows or after save flows for each object. And refrain from building flow custom error validation triggering on stage changes.
When i retrieve this flow from ANT tool and try to deploy in other environment its giving error saying " Error : Invalid element reference not found for target.
Your best bet is to ask here: sfxd.github.io/ . Jeff is there most of the time.
@salesforcebreak Andy - based on this Cautionary Tale of using the Custom Error messages in Flow, do you have any guidance or best practices on how to avoid this issue? Perhaps trying to consolidate any Custom Error messages into a single Flow if used for "validation" purposes? I would appreciate any thoughts you may have on the subject. ~ Thanks!
There are several UI pitfalls with this at the moment. Some are: 1) When you use a custom error message on the back of a record change that can be done via a path component, the message appears on top in red and disappears. You cannot control where and how it appears. 2) The messages appear in sequence. Before save, after save, and validation rules don't show up at the same time. I built many fault paths for a client and connected them to the custom error message element. They said they ended up removing all, because they wanted to see the messages by other automations/code/validations, but they could not when this design was active. I heard a few other complaints but I cannot remember all of them. I think in the future we will be able to do all this inside flow rather than inside validation rules, but we are not there yet. For now, it would be best if you could build all such errors into validations before save flows or after save flows for each object. And refrain from building flow custom error validation triggering on stage changes.
Excellent insight! Thank you for your time@@SalesforceBreak
@@MikeAtCirrius Thanks for the inspiration, this will be a blog post soon.
Here it is: salesforcebreak.com/2024/03/27/four-tips-for-leveraging-custom-errors-in-flows/