昨天我在之前成功的自定义按钮上更新了DocuSign模板ID,并开始收到以下错误消息。所以我将模板ID更改回原始值并继续收到相同的错误。
关于可能发生的事情的想法?
错误消息:
“超出Apex CPU时间限制错误位于页面dsfs中的组件'{!CreateEnvelopeRecord}'中:docusign_createenvelope:(dsfs)”
按键代码:
{!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:
// DocuSign Template ID (default no template)
DST = '5FA61634-AA13-4BCB-B02A-521B19C3DFB4'; //Ex: '67870A79-A0B5-4596-8AC1-CC7CC1EA01EB'
// Load Attachments (default on)
LA = ''; //Ex: '0'
// Custom Email Message (default in config)
CEM = 'Thank you for doing business with XOJet, here is the agreement for your signature.' ; //Ex: 'Envelope sent by [FirstName] [LastName] ([Email])!'
// Custom Email Subject (default in config)
CES = 'XOJet agreement for signature'; //Ex: 'Re: Opportunity Name: {!Opportunity.Name}'
// Show Tag Button (default in config)
STB = ''; //Ex: '1'
// Show Send Button (default in config)
SSB = ''; //Ex: '1'
// Show Email Message (default in config)
SEM = ''; //Ex: '1'
// Show Reminder/Expire (default in config)
SRS = ''; //Ex: '1'
// Show Chatter (default in config)
SCS = ''; //Ex: '1'
// Reminder and Expiration Settings
RES = ''; //Ex: '0,1,2,0,120,3'
//********* 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 :(得分:0)
这是托管包还是您自己的页面?该页面运行时间太长,超出了调控器限制(来自Salesforce)。如果它是你自己的页面,那么检查你的代码(特别是寻找要消除的循环)。
如果管理,您可能需要提交一张票。
Salesforce限制文档: https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
答案 1 :(得分:0)
我仍然不确定发生了什么,但我可能有一个新的线索。我在DocuSign for Salesforce.com
的另一个讨论中找到了以下代码奇怪的是,如果我使用下面的代码,我将不再收到“时间限制”错误。但是,当我将自定义包络ID替换为我正在使用的那个时,它会中断。相同的“时间限制”错误。
我再次下载了XML或模板以仔细检查ID,这是正确的。我知道几乎压缩代码和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~johnsemail@outlook.com;FirstName~user;LastName~1;Role~Signer 1;RoutingOrder~1,Email~janesemail@outlook.com;LastName~user2;Role~Signer 2;RoutingOrder~2,LoadDefaultContacts~1';
//Custom Contact Role Map
var CCRM='Signer 1~Customer;Signer 2~SalesRep';
//Custom Contact Type Map
var CCTM='Signer 1~Signer;Signer 2~Signer';
//Custom Email Subject
var CES='Please eSign Vocus Sales Agreement';
//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.';
//Custom Envelop from Docusign
var DST = '7C350ABB-74F9-463E-96E3-49153AA25607';
//********* 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;
//*******************************************//