I have created a Survey process for internal users. I set the field OptionsAllowGuestUserResponse = true to skip the login page that appears for Internal users when they try to give feedback. For this, the internal users don't have to log in to give feedback. But now the survey link is available for multiple survey attempts. Can anyone have any idea how to prevent the multiple survey attempt?
SurveyInvitation Sv = New SurveyInvitation();
Sv.CommunityId = NETWORKID;
Sv.Name = SURVEYNAME;
//Sv.ParticipantId = Cse.RelatedPerson__c;
Sv.OptionsCollectAnonymousResponse = false;
Sv.OptionsAllowGuestUserResponse = true;
Sv.SurveyId = surv.Id;
Sv.RecordTypeId = RECID;
Database.SaveResult result = DATABASE.INSERT(Sv);