function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VbourbeauVbourbeau 

Create new contact with flow and validate duplicate

Hi

 

I want to implement a visual workflow to create contact. All work great but if the user enter a existing email adresse the flow give error. It's normal because we can't have duplicate contact email. So I use lookup to find if the email already exist if yes do error. It is fine if the user can lookup on all contact but most of our user don't have acces to all contact so the lookup work only for is contact.

 

So can I allow lookup on all contact even if the user don't own it? Or kind of validation on my email fields in the flow...

 

thank

 

gksgks
Flows run w/ the security and sharing settings of the running user.

If you run the flow in a force.com site, it runs w/ the security and sharing of the site guest user. I have thought of trying to use that in the case where I need the flow to run with different security settings than the running user, but have not tried. I believe it would work.
RajaramRajaram
Thank Gorav on the input.
So you need to look at your sharing model, if you can read **any**contact, you should be able to use a flow to look for duplicate contacts. If not, its going to be hard.
VbourbeauVbourbeau

Yes my user don't have the read access on each contact. I use a workaround... The fault error message. When a fault occure on  a object creation  we can trap the fault message. I can now look the contain of the message and redirect it .