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
Ferhat CHETOUANIFerhat CHETOUANI 

Apex trigger : optionsAllowGuestUserResponse

Hi everybody,

Although you can create a SurveyInvitation record in ProcessBuilder, there is no access to these fields in Process Builder : OptionsAllowGuestUserResponse
OptionsAllowParticipantAccessTheirResponse
OptionsCollectAnonymousResponse Without access,

these fields all default to false when the Survey Invitation is created. If you want to allow guest users to respond to a survey invitation, OptionsAllowGuestUserResponse must be set to true. Otherwise, all responders have to log in, either as a user or community user, before they can access the survey. Without Process Builder access, the only alternative is a trigger.

Someone can help me to create one ? I'm a beginner Thanks in advance for your help
Raj VakatiRaj Vakati
try this trigger
 
trigger asdasd on SurveyInvitation (before insert) {
    for(SurveyInvitation s : Trigger.new){
        s.OptionsAllowGuestUserResponse =true ;
        s.OptionsAllowParticipantAccessTheirResponse=true ;
        s.OptionsCollectAnonymousResponse=true ;
    }
}