@@ -41,14 +41,12 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
4141 string envelopeId = results . EnvelopeId ;
4242 //ds-snippet-end:eSign11Step2
4343
44- //ds-snippet-start:eSign11Step3
4544 // Step 3. create the sender view
4645 // Call the CreateSenderView API
4746 // Exceptions will be caught by the calling function
48- ReturnUrlRequest viewRequest = new ReturnUrlRequest
49- {
50- ReturnUrl = returnUrl ,
51- } ;
47+ //ds-snippet-start:eSign11Step3
48+ EnvelopeViewRequest viewRequest = PrepareViewRequest ( startingView , returnUrl ) ;
49+
5250 ViewUrl result1 = envelopesApi . CreateSenderView ( accountId , envelopeId , viewRequest ) ;
5351
5452 // Switch to Recipient and Documents view if requested by the user
@@ -64,6 +62,50 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
6462 return redirectUrl ;
6563 }
6664
65+ //ds-snippet-start:eSign11Step3
66+ private static EnvelopeViewRequest PrepareViewRequest ( string startingView , string returnUrl )
67+ {
68+ EnvelopeViewSettings viewSettings = new EnvelopeViewSettings
69+ {
70+ StartingScreen = startingView ,
71+ SendButtonAction = "send" ,
72+ ShowBackButton = "false" ,
73+ BackButtonAction = "previousPage" ,
74+ ShowHeaderActions = "false" ,
75+ ShowDiscardAction = "false" ,
76+ LockToken = string . Empty ,
77+ RecipientSettings = new EnvelopeViewRecipientSettings
78+ {
79+ ShowEditRecipients = "false" ,
80+ ShowContactsList = "false" ,
81+ } ,
82+ DocumentSettings = new EnvelopeViewDocumentSettings
83+ {
84+ ShowEditDocuments = "false" ,
85+ ShowEditDocumentVisibility = "false" ,
86+ ShowEditPages = "false" ,
87+ } ,
88+ TaggerSettings = new EnvelopeViewTaggerSettings
89+ {
90+ PaletteSections = "default" ,
91+ PaletteDefault = "custom" ,
92+ } ,
93+ TemplateSettings = new EnvelopeViewTemplateSettings
94+ {
95+ ShowMatchingTemplatesPrompt = "true" ,
96+ } ,
97+ } ;
98+
99+ EnvelopeViewRequest viewRequest = new EnvelopeViewRequest
100+ {
101+ ReturnUrl = returnUrl ,
102+ ViewAccess = "envelope" ,
103+ Settings = viewSettings ,
104+ } ;
105+ return viewRequest ;
106+ }
107+ //ds-snippet-end:eSign11Step3
108+
67109 //ds-snippet-start:eSign11Step2
68110 private static EnvelopeDefinition MakeEnvelope ( string signerEmail , string signerName , string ccEmail , string ccName , string docDocx , string docPdf , string envStatus )
69111 {
0 commit comments