从Custom DocuSign按钮添加信封自定义字段

时间:2015-03-23 20:38:37

标签: javascript salesforce docusignapi

我在Salesforce中使用自定义按钮来填充某些信息。我还需要能够填充自定义信封字段。我知道这可以通过API完成,但我正在尝试使用自定义按钮逻辑。

自定义按钮:

    `{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} 

//********* Option Declarations (Do not modify )*********// 
var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';
//*************************************************// 

//DocuSign Template 

var DST=''; 

//Adding Notes & Attachments 
var LA='1'; 

//Custom Recipient List 
var CRL='Email~{!Account.PersonEmail};FirstName~{!Account.FirstName};LastName~{!Account.LastName};Role~Signer 1;RoutingOrder~1,Email~{!Account.OwnerEmail};FirstName~{!Account.OwnerFirstName};LastName~{!Account.OwnerLastName};Role~Signer 2;RoutingOrder~2,Email~backoffice@safehomecontrol.com;FirstName~Back;LastName~Office;Role~Signer 3;RoutingOrder~3,LoadDefaultContacts~1';

//Custom Contact Role Map 
var CCRM='Signer 1~Signer 1;Signer 2~Signer 2;Signer 3~Signer 3'; 

//Custom Contact Type Map 
var CCTM='Signer 1~Signer;Signer 2~Signer;Signer 3~Signer'; 

//Custom Email Subject 
var CES='10753675 Confirm#:{!Account.Confirmation_Number__c}, - New Customer: ({!Account.Name})'; 

//Custom Email Message 
var CEM='I am sending you this request for your electronic signature, please review and electronically sign by following the link below.';

//One Click
var OCO='Send'; 

//Custom Envelope from Docusign 
var DST = 'E862C52F-B37C-47C3-8C9E-8A76A48E9D35';

//********* Page Callout (Do not modify) *********// 
window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Account.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************//

API说明(我希望这样做,但改为使用上面的代码):

{"inlineTemplates": [{
        "sequence": "1",        
        "customFields": {
            "textCustomFields": [{
                "name": "MyOwnField",
                "required": "true",
                "show": "true",
                "value": "MyValue"
            }]
        },

1 个答案:

答案 0 :(得分:0)

目前无法通过DocuSign for Salesforce设置自定义信封字段。但是,如果您使用DrawLoop或Conga Merge(或如您所说的那样通过API),则可以设置它们。