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
snapssnaps 

Showing/hiding contact detail buttons based on whether or not email information is matched

I have a flow where the user enters his contact information, and the flow checks if his email is in the system or not. If he is in the system, he is sent to the page with all of his contact details and the screen confirming his information. If he isn't, the system automatically creates a new record of the user and then sends him to the page with all of his contact details, as well as the screen confirming the creation of his new contact record.

 

Right now, the page is set up so that the edit, clone, delete and share buttons are hidden - I do not want the users who already have their information set up to be able to edit their information. I do, however, want the new users to be able to edit their contact details. Is this even possible to do with the workflow, and how should I approach this? 

RajaramRajaram
Sorry I am a bit unclear, especially between the 2 things you mentioned here. You have a flow which lets you create or redirect the user.
But then you state you want to hide the edit button but have the new button open for new users.

Are you asking how to do this such that you have the user create a new record using standard "New" button ui and others to use the flow?
snapssnaps
Kind of. If the user enters in his email address and there is a match, then
he is directed to a screen confirming that there is a match. Using the Apex
detail tag, the user contact details is shown underneath that screen. The
built-in edit, delete, share, and clone buttons have been hidden.

What I want to do next, and is where I'm running into difficulty, if the
user's email has no match. A new contact is created, and he is directed to
a screen saying "You have created a new contact." Since I used the above
detail tag, the contact details are also shown below the screen and the
buttons are still hidden. I want the edit button to be visible however, and
can't think of a way to do that.

I hope that's clearer and that I didn't repeat myself from my original
post.