Skip to content

Commit 28326bf

Browse files
authored
Merge pull request #175 from docusign/embedded-sending
Embedded sending example updates
2 parents 142701d + 1ddd393 commit 28326bf

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

launcher-csharp/eSignature/Examples/EmbeddedSending.cs

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
4545
// Step 3. create the sender view
4646
// Call the CreateSenderView API
4747
// Exceptions will be caught by the calling function
48-
ReturnUrlRequest viewRequest = new ReturnUrlRequest
49-
{
50-
ReturnUrl = returnUrl,
51-
};
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,48 @@ public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string
6462
return redirectUrl;
6563
}
6664

65+
private static EnvelopeViewRequest PrepareViewRequest(string startingView, string returnUrl)
66+
{
67+
EnvelopeViewSettings viewSettings = new EnvelopeViewSettings
68+
{
69+
StartingScreen = startingView,
70+
SendButtonAction = "send",
71+
ShowBackButton = "false",
72+
BackButtonAction = "previousPage",
73+
ShowHeaderActions = "false",
74+
ShowDiscardAction = "false",
75+
LockToken = string.Empty,
76+
RecipientSettings = new EnvelopeViewRecipientSettings
77+
{
78+
ShowEditRecipients = "false",
79+
ShowContactsList = "false",
80+
},
81+
DocumentSettings = new EnvelopeViewDocumentSettings
82+
{
83+
ShowEditDocuments = "false",
84+
ShowEditDocumentVisibility = "false",
85+
ShowEditPages = "false",
86+
},
87+
TaggerSettings = new EnvelopeViewTaggerSettings
88+
{
89+
PaletteSections = "default",
90+
PaletteDefault = "custom",
91+
},
92+
TemplateSettings = new EnvelopeViewTemplateSettings
93+
{
94+
ShowMatchingTemplatesPrompt = "true",
95+
},
96+
};
97+
98+
EnvelopeViewRequest viewRequest = new EnvelopeViewRequest
99+
{
100+
ReturnUrl = returnUrl,
101+
ViewAccess = "envelope",
102+
Settings = viewSettings,
103+
};
104+
return viewRequest;
105+
}
106+
67107
//ds-snippet-start:eSign11Step2
68108
private static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerName, string ccEmail, string ccName, string docDocx, string docPdf, string envStatus)
69109
{

launcher-csharp/eSignature/Views/EmbeddedSending/eg011.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
</label>
2828

2929
<select id="startingView" name="startingView" class="form-control">
30-
<option value="tagging" selected>Tagging view</option>
31-
<option value="recipient">Recipient &amp; Documents view</option>
30+
<option value="Tagger" selected>Tagging view</option>
31+
<option value="Prepare">Prepare view</option>
3232
</select>
3333
</div>
3434
<div class="form-group">

launcher-csharp/launcher-csharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ItemGroup>
3939
<PackageReference Include="DocuSign.Admin" Version="2.0.0-rc1" />
4040
<PackageReference Include="DocuSign.Click" Version="2.0.0-rc1" />
41-
<PackageReference Include="DocuSign.eSign.dll" Version="7.0.0-rc1" />
41+
<PackageReference Include="DocuSign.eSign.dll" Version="7.0.0-rc2" />
4242
<PackageReference Include="DocuSign.Monitor" Version="2.0.0-rc1" />
4343
<PackageReference Include="DocuSign.Maestro" Version="1.0.0-rc1" />
4444
<PackageReference Include="DocuSign.Rooms" Version="2.0.0-rc1" />

0 commit comments

Comments
 (0)