You need to sign in to do that
Don't have an account?

Creating flow for primary contact update on all account types equaling customer?
We have a custom object in our contacts section that says "Primary contact" and it is a checkbox. Each account with account type customer needs to have at least one primary contact. I do not want to create a step where this is ticked in a flow but I do want it to trigger some sort of validation error or message saying you cannot save a record with account type customer unless you have at least one primary contact. I tried to create a flow but haven´t done this before so not quite sure which parameters I need to add.
You have to create rollup summar for getting the count of primary contact and then create the validation rule like "if the rollup summary count less than 1, make to show the error.". If you are unable to followup, please let me know and I will help you.
Please contact us, if you need anyother support,
http://www.merfantz.com/contact
Thanks
Please refer this and It will resolve your query. JUST COPY POST THE CODE AND IT WILL WORK FOR YOUR SCENARIO.
http://merfantz.com/blog/how-to-show-error-message-in-trigger-in-salesforce/
Thanks.