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
SalesforceDevNewbie022SalesforceDevNewbie022 

How to create unique survey invitation link for salesforce survey invitation created from flow?

I have created survey invitation record from flow with options as: 

OptionsAllowGuestUserResponse =true and added participant.

For the first time, user is able to access the survey without login and completes it.

But for second time when he clicks on same link, he should not be able to see the survey instead he should get error message as 'Survey has been already completed'. but in my case he is able to access the survey.

Can anyone help me in this?

PriyaPriya (Salesforce Developers) 
Hi,

1. Before creating a survey, try querying on the survey records if the user has completed or not using any unique field of the survey record. E.g., email

2. If the record is found, display the error else redirect to the creation form.
 

Please mark it as the Best Answer so that it can help others in the future.

Regards,

Priya Ranjan