How to add two Signer using Custom Button Logic in Salesforce - docusignapi

Below i have coded the Custom Button in Javascript to add two signer in Docusign Envelope.
var RROS='1';
var CRL='Email~{!Case.Hidden_Merchant_Email__c};LastName~{!Merchant__c.Name};Role~Signer 1;RoutingOrder~1;Email~{!Account.PersonEmail};LastName~{!Account.LastName};Role~Signer 2;RoutingOrder~2,LoadDefaultContacts~1';
var CCRM='Signer 1~Merchant;Signer 2~Account Holder';
var CCTM='Signer 1~Signer;Signer 2~Signer';
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Case.Id}&CRL="+CRL+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM;
But here only signer is added in Docusign Envelope. I need to add two Signer in Envelope. Can anyone please provide the correct script if i made a mistake in the given code?. Thanks in advance.

Yes, you can send to more than one recipient. Even better, not all of the recipients need to be signers. Eg, you can send to some people to get a copy of the document after it's been signed, rather than sign. There are other options too, including Sign in person signers, etc.
Anyhow, multiple recipients are sent via the CRL query parameter, separated with commas. This documented on page 67 of the Admin Guide
Here's my version of your code (untested).
var RROS='1',
CRL='Email~{!Case.Hidden_Merchant_Email__c};' +
'LastName~{!Merchant__c.Name};' +
'Role~Signer 1;' +
'RoutingOrder~1,' + // end of signer 1
'Email~{!Account.PersonEmail};' +
'LastName~{!Account.LastName};' +
'Role~Signer 2;' +
'RoutingOrder~2,' + // end of signer 2
'LoadDefaultContacts~1',
CCRM='Signer 1~Merchant;Signer 2~Account Holder',
CCTM='Signer 1~Signer;Signer 2~Signer',
qparams = 'DSEID=0&' +
'SourceID={!Case.Id}&' +
'CRL="' + CRL + '"&' +
'RROS="' + RROS + '"&' +
'CCRM="' + CCRM + '"&' +
'CCTM="' + CCTM + '"';
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?" + qparams;

Related

Send details to email on click of a button

I am developing an android app and i have a few edit texts and a submit button.
On click of the submit button all the fields in the edit texts entered by the user should be sent to a particular email id.
Could anyone please suggest me how it can be done?
String s = editText.getText().toString();
in button's onClickListner() method use this
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + email));
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(Intent.EXTRA_TEXT, s);
//emailIntent.putExtra(Intent.EXTRA_HTML_TEXT, body); //If you are using HTML in your body text
startActivity(Intent.createChooser(emailIntent, "Send Email via"));
Already answered Here
As you are working with multiple editTexts you can do this,
String s = (editText1.getText().toString() + "\n" + editText2.getText().toString() + "\n"+editText3.getText().toString() + "\n" + editText4.getText().toString() + "\n" + editText5.getText().toString() + "\n" + editText6.getText().toString() + "\n");
and then use same snippet as above.
If you want to know how send email without prior user interaction then see this answer
see this code snippet here also : https://github.com/enrichman/androidmail
There is also an API available named mandrillapp:
Read this blog for full code : https://www.mindstick.com/Articles/1673/sending-mail-without-user-interaction-in-android

Why is my DocuSign CarbonCopy blank?

I'm attempting to send an envelope built from a template to one signer(Client) and have a carbon copy sent to our enroller. I'm populating the tabs with information from my DB, specific to the signer, which is why I need to use the template. I need the carbon copy to have the information present, or ideally to generate at the completed status.
When I set the routing order in the template as 1 for both the signer and CarbonCopy, the template is created and sent to the signer correctly, but the CC version is blank when sent. However, if set the signer as 1 and CC as 2, the template still sends to signer correctly, but the CarbonCopy is never generated. In neither case is the CarbonCopy sent on envelope completion.
I've tried renaming and moving the orders around as was suggested/answered in:
Docusign - Adding a non signing CC role with same routing order, but hasn't solved my issue.
I've also attempted to use the recipients/signer/CarbonCopy tags instead of the TemplateRoles/TemplateRole tags, but I get an error message stating that TemplateID cannot be used with the recipient tags.
What can I change to either have the Carbon Copy not be blank or be recieved when the envelope is completed?
My code is as follows, with the text entries shortened for brevity:
"<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<status>sent</status>" +
"<emailSubject>DocuSign API - Signature Request from Template</emailSubject>" +
"<templateId>" + templateId + "</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<name>" + client.Name + "</name>" +
"<email>" + client.Email + "</email>" +
"<roleName>" + "Signer" + "</roleName>" +
"<tabs>" +
"<textTabs>" +
"<text>" +
"<tabLabel>Name</tabLabel>" +
"<value>" + client.name + "</value>" +
"<locked>true</locked>" +
"<documentId>1</documentId>" +
"<pageNumber>1</pageNumber>" +
"</text>" +
"</textTabs>" +
"</tabs>" +
"</templateRole>" +
"<templateRole>" +
"<name>" + "enroller.Name" + "</name>" +
"<email>" + enroller.Email + "</email>" +
"<roleName>" + "EnrollerCarbonCopy" + "</roleName>" +
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";
Carbon Copy in DocuSign (CC) can view the envelope at any time, but receives the email based on the routing order. That recipient will also receive the final/completed document at the end of the process.
Example #1 - This example shows the Carbon Copy receiving the document only after Recipient 1 has signed
Recipient 1 set with Signing Order 1 - Needs to Sign
Recipient 2 set with Signing Order 2 - Carbon Copy
Recipient 3 set with Signing Order 3 - Needs to Sign
Example #2 - This example shows the Carbon Copy receiving the document after both Recipient 1 and 2 have signed
Recipient 1 set with Signing Order 1 - Needs to Sign
Recipient 2 set with Signing Order 2 - Needs to Sign
Recipient 3 set with Signing Order 3 - Carbon Copy
So if you want to send the document to a Recipient with all the eSignatures completed, add the carbon copy at the end of the workflow like example #2. In both examples the carbon copy only gets one email notification with an attached document.

Customizing Tags in SendGrid Node Module

I am trying to send automated thank you emails using the SendGrid NodejS module. In the text field I would like to add the person's full name which I have stored as a variable. When I put the variable in the text field it fails. I would think the bottom use case is correct but it keeps failing.
var email = new sendgrid.Email({
to: customerEmail,
toname: fullName,
fromname: 'Treasurer',
from: 'treasurer#shalomravaustin.com',
subject: 'Payment Confirmed',
text: 'Hello' + ' ' + fullName + ' ' + Thanks for paying online'
});
You have missed one of single qoute in text field just before thanks.
it should be
text: 'Hello' + ' ' + fullName + ' ' + 'Thanks for paying online'
Apart from this, I don't think there is any error. and also check if FullName variable is not empty.

Docusign Developement E-Mails

I am using the DocuSign API to allow the first person in a chain of people to sign an embedded document. The rest of the people should sign the document via e-mail. Is this possible? Is there a limit of how many e-mails you can send from a developer account? I'm successfully creating and signing the envelope but none of the other e-mail accounts I have listed on the envelope receive a copy.
String requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<accountId>" + accountId + "</accountId>" +
"<status>sent</status>" +
"<emailSubject>" + emailSubject + "</emailSubject>" +
"<emailBlurb>" + emailBlurb + "</emailBlurb>" +
"<templateId>81bcad0d-91ed-4616-ae97-f281b2xxxxxx</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + emailaddr4[0] + "</email>" +
"<name>" + names[0] + "</name>" +
"<roleName>Student</roleName>" +
"<clientUserId>1</clientUserId>" +
"<tabs>" +
"<textTabs>" +
"<text>" +
"<tabLabel>sid</tabLabel>" +
"<value>" + student_id + "</value>" +
"</text>" +
"</textTabs>" +
"</tabs>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[1] + "</email>" +
"<name>" + names[1] + "</name>" +
"<roleName>Advisor</roleName>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[2] + "</email>" +
"<name>" + names[2] + "</name>" +
"<roleName>Dept Head of Major</roleName>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[3] + "</email>" +
"<name>" + names[3] + "</name>" +
"<roleName>Dean of School</roleName>" +
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";
As long as you do not set the clientUserId property for a recipient in the "Create/Send Envelope" API request, then DocuSign should send an email to the recipient when it becomes their turn in the envelope routing order.
I'd suggest that you try executing a "Get Recipients" call (https://demo.docusign.net/restapi/v2/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?include_tabs=false&include_extended=false) for the Envelope and examine the response as a means of troubleshooting:
Examine recipients and email addresses -- do they match what you expect?
Is the clientUserId property set for any of the recipients? If that property is set for a recipient, DocuSign will NOT email them when it's their turn to sign.
What is the value of the top-level currentRoutingOrder property in the response? Only recipients who have a routingOrder property value equal to or less than the value of the top-level currentRoutingOrder property -- AND who also do not have the clientUserId property set -- will have received an Email from DocuSign at the current point in time.
Finally, if those troubleshooting tips don't lead anywhere -- definitely check the "Spam" folder for any user who apparently should have received an Email from DocuSign but apparently hasn't (i.e., the email never showed up in the Inbox). There is no limitation imposed upon Demo accounts regarding Envelope usage or number of recipient emails that you're allowed to send -- if you create the Envelope correctly, DocuSign will send the recipient email(s) at the appropriate times in the routing sequence.

SharePoint : Translating links for me, and its unwanted

I am inserting a list item using sharepoint web services....
Here is my code:
item += #"<Field Name=""HyperLinkField"">" + this.SharePointSiteAddressLinks + #"/lists/" + this.ListName + #"/" + this.ID + "_" + this.MessageID + ", " + this.MessageID + ".ext</Field>";
the value of SharePointSiteAddressLinks is http://machineName
The list item gets inserted into the list, but the value of the hyperlink is set to http://localhost
Firstly - why does SharePoint take it apon itself to (incorrect) my links, 2ndly what can I do to turn it off?
Thank you
Restarted the server, everything worked fine....

Resources