我正在salesforce的机会对象上创建自定义docusign按钮,在我制作代码后,我收到错误消息"意外的令牌〜"。不知道这意味着什么。我只能希望我的代码略微偏离。这是代码:
{!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='';
//*************************************************//
// Modify individual options here://
// Recipient Starting Routing Order (default 1)//
RSRO = '1';
// Recipient Routing Order Sequential (default not sequential)//
RROS = '1';
// Custom Recipient List//
CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1',
Email~;FirstName~;LastName~;Role~Signer 2;RoutingOrder~2;SignNow~1,
Email~john.g@playmakercrm.com;FirstName~John;LastName~Griscavage;Role~Signer 3;RoutingOrder~3;SignNow~0,
Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 4;RoutingOrder3~;SignNow~,
Email~adam.bishop@playmakercrm.com;FirstName~Adam;LastName~Bishop;Role~Signer 5;RoutingOrder~3;SignNow~0,
Email~accounting@playmakercrm.com;FirstName~Accounting;LastName~Department;Role~Signer 6;RoutingOrder~3;SignNow~0,
Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Signer 7;RoutingOrder~3;SignNow~0,
Email~laura.mcdavid@playmakercrm.com;FirstName~Laura;LastName~McDavid;Role~Signer 8;RoutingOrder~3;SignNow~0;
// One Click Option (default edit envelope screen)//
OCO = 'Tag';
// Load Attachments (default on)//
LA = '1';
// Show Tag Button (default in config)//
STB = '1';
// Show Send Button (default in config)//
SSB = '1';
// Show Email Subject (default in config)//
SES = '1';
// Show Email Message (default in config)//
SEM = '1';
// Show Reminder/Expire (default in config)//
SRS = '1';
//********* Page Callout (Do not modify) *********//
window.location.href =
"/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRC
L+"&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;
//*******************************************//
我感谢有人可以在这里提供帮助。
更新的代码(删除换行符)
{!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='';
//*************************************************//
// Modify individual options here://
RSRO = '1';RROS = '1';CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1',Email~;FirstName~;LastName~;Role~Signer 2;RoutingOrder~2;SignNow~1,Email~john.g@playmakercrm.com;FirstName~John;LastName~Griscavage;Role~Signer 3;RoutingOrder~3;SignNow~0,Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 4;RoutingOrder3~;SignNow~,Email~adam.bishop@playmakercrm.com;FirstName~Adam;LastName~Bishop;Role~Signer 5;RoutingOrder~3;SignNow~0,Email~accounting@playmakercrm.com;FirstName~Accounting;LastName~Department;Role~Signer 6;RoutingOrder~3;SignNow~0,Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Signer 7;RoutingOrder~3;SignNow~0,
Email~laura.mcdavid@playmakercrm.com;FirstName~Laura;LastName~McDavid;Role~Signer 8;RoutingOrder~3;SignNow~0;OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';
//********* Page Callout (Do not modify) *********//
window.location.href =
"/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRC
L+"&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;
//*******************************************//
我已经完成了Larry K在下面建议并更新了代码。现在,当我单击按钮时,错误消息不会显示。什么都没发生。它几乎就像没有开火一样。
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
//********* Option Declarations (Do not modify )*********//var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';varCCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';varCES='';var STB='';varSSB='';var SES='';var SEM='';var SRS='';var SCS ='';varRES='';//*************************************************//
// Modify individual options here://RSRO = '1';RROS = '1';CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1,Email~client@domain.com;FirstName~Client;LastName~Name;Role~Signer 2;RoutingOrder~2;SignNow~1,Email~john.g@playmakercrm.com;FirstName~John;LastName~Griscavage;Role~Signer 3;RoutingOrder~3;SignNow~0,Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 4;RoutingOrder3~;SignNow~0,Email~adam.bishop@playmakercrm.com;FirstName~Adam;LastName~Bishop;Role~Signer 5;RoutingOrder~3;SignNow~0,Email~accounting@playmakercrm.com;FirstName~Accounting;LastName~Department;Role~Signer 6;RoutingOrder~3;SignNow~0,Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Signer 7;RoutingOrder~3;SignNow~0,Email~laura.mcdavid@playmakercrm.com;FirstName~Laura;LastName~McDavid;Role~Signer 8;RoutingOrder~3;SignNow~0'; OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';
//********* Page Callout (Do not modify) *********//window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.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;
//*******************************************//
更新的代码再次出现。从自定义配方列表中删除了除一个以外的所有收件人。按钮仍然不会触发。它什么都不做。这可能是我在salesforce中缺少的东西吗?
以下是只有一位收件人的更新代码:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
//********* Option Declarations (Do not modify )*********//var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';varCCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';varCES='';var STB='';varSSB='';var SES='';var SEM='';var SRS='';var SCS ='';varRES='';//*************************************************//
// Modify individual options here://RSRO = '1';RROS = '1';CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1'; OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';
//********* Page Callout (Do not modify) *********//window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.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;
//*******************************************//
答案 0 :(得分:2)
看起来您的页面标注有换行符(如果直接从DocuSign文档中复制它们)。尝试将变量放在:
之间{REQUIRESCRIPT(" /顶点/ dsfs__DocuSign_JavaScript")!}
// *********选项声明(不要修改)********* // var RC = '&#39 ;; var RSL ='&#39 ;; var RSRO ='&#39 ;; var RROS ='&#39 ;; var CCRM =&# 39;&#39 ;; var CCTM ='&#39 ;; var CCNM ='&#39 ;; var CRCL ='&#39 ;; var CRL ='&#39 ;; var OCO ='&#39 ;; var DST ='&#39 ;; var LA ='&#39 ;; var CEM ='&#39 ;; var CES ='&#39 ;; var STB ='&#39 ;; var SSB ='&#39 ;; var SES = '&#39 ;; var SEM ='&#39 ;; var SRS ='&#39 ;; var SCS ='&#39 ;; var RES ='&#39 ;; // ********* * //
//在此修改单个选项://
// *********页面标注(不要修改)********* // window.location.href = " /顶点/ dsfs__DocuSign_CreateEnvelope DSEID = 0&安培;?的SourceID =安培{Opportunity.Id!}; RC =&#34 + RC +"&安培; RSL =&#34 + RSL +&#34 ;&安培; RSRO =&#34 + RSRO +"&安培;复制权组织=&#34 +复制权组织+"&安培; CCRM =&#34 + CCRM +"&安培; CCTM = &#34 + CCTM +"&安培; CRCL =&#34 + CRCL +"&安培; CRL =&#34 + CRL +"&安培; OCO =&#34 + OCO +"&安培; DST =&#34 + DST +"&安培; CCNM =&#34 + CCNM +"&安培; LA =&#34 + LA +&#34 ;&安培; CEM =&#34 + CEM +"&安培; CES =&#34 + CES +"&安培; SRS =&#34 + SRS +"&安培; STB = &#34 + STB +"&安培; SSB =&#34 + SSB +"&安培; SES =&#34 + SES +"&安培; SEM =&#34 + SEM +"&安培; SRS =&#34 + SRS +"&安培; SCS =&#34 + SCS +"&安培; RES =&#34 + RES; // *********** //
答案 1 :(得分:0)
documentation for creating custom buttons表示CRL采用字符串参数。但是,您的CRL值无效,因为:
此外,您可能需要使用会计组的电子邮件别名。使用DocuSign签名组可能会更好。我还不知道Salesforce集成是否支持该功能。
要进行调试,首先在CRL值中的每个逗号后添加一个返回,并检查每一行(每个收件人)是否完整:
RSRO = '1';RROS = '1';CRL = '
Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1,
Email~john.g@playmakercrm.com;FirstName~John;LastName~Griscavage;Role~Signer 3;RoutingOrder~3;SignNow~0,
Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 4;RoutingOrder3~;SignNow~0,
Email~adam.bishop@playmakercrm.com;FirstName~Adam;LastName~Bishop;Role~Signer 5;RoutingOrder~3;SignNow~0,
Email~accounting@playmakercrm.com;FirstName~Accounting;LastName~Department;Role~Signer 6;RoutingOrder~3;SignNow~0,
Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Signer 7;RoutingOrder~3;SignNow~0,
Email~laura.mcdavid@playmakercrm.com;FirstName~Laura;LastName~McDavid;Role~Signer 8;RoutingOrder~3;SignNow~0
';
OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';
(注意CRL值开头和结尾的撇号)
接下来,从CRL值中删除返回值,希望它对您有用:
RSRO = '1';RROS = '1';CRL = 'Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 1;RoutingOrder~1;SignNow~1,Email~john.g@playmakercrm.com;FirstName~John;LastName~Griscavage;Role~Signer 3;RoutingOrder~3;SignNow~0,Email~anthony.m@playmakercrm.com;FirstName~Anthony;LastName~Miranda;Role~Signer 4;RoutingOrder3~;SignNow~0,Email~adam.bishop@playmakercrm.com;FirstName~Adam;LastName~Bishop;Role~Signer 5;RoutingOrder~3;SignNow~0,Email~accounting@playmakercrm.com;FirstName~Accounting;LastName~Department;Role~Signer 6;RoutingOrder~3;SignNow~0,Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Signer 7;RoutingOrder~3;SignNow~0,Email~laura.mcdavid@playmakercrm.com;FirstName~Laura;LastName~McDavid;Role~Signer 8;RoutingOrder~3;SignNow~0'; OCO = 'Tag';LA = '1';STB = '1';SSB = '1';SES = '1';SEM = '1';SRS = '1';