1
通过在SF Classic中设置CRL参数,我可以使用javascript按钮预填充收件人列表。在Salesforce Lightning中自定义“使用Docusign发送”
现在我想在Lightning中做到这一点。 我试图创建一个VF页面,将用户重定向到dsfs__DocuSign_CreateEnvelope页面并添加所需的ur参数(很像在JS按钮中)。 它部分工作 - 它预先填充收件人列表,它允许发送电子邮件。但最后抛出一个错误:“受控dsfs.EnvelopeController没有产生的Javascript代理:可以不使用iframe内的公共远程方法”
什么是实现雷电这样的功能的正确方法? 它甚至有可能吗?
UPDATE: VF页:
<apex:page standardController="Opportunity"
extensions="CTRL_DocusignRedirect"
sidebar="false"
showHeader="false"
action="{!autoRun}"
>
<apex:sectionHeader title="DocuSign"/>
<apex:outputPanel >
You tried calling an Apex Controller from a button.
If you see this page, something went wrong.
Please notify your administrator.
</apex:outputPanel>
</apex:page>
控制器:
global class CTRL_DocusignRedirect
{
private static final STRING PARAM_DSEID = 'DSEID';
private static final STRING PARAM_SOURCE_ID = 'SourceID';
private static final STRING PARAM_CRL = 'CRL';
private Opportunity anOpportunity = null;
public CTRL_DocusignRedirect(ApexPages.StandardController stdController)
{
Id opportunityId = stdController.getRecord().Id;
this.anOpportunity = DAL_Opportunity.getById(opportunityId);
}
public PageReference autoRun()
{
if (this.anOpportunity == null)
{
return null;
}
PageReference pageRef = Page.dsfs__DocuSign_CreateEnvelope;
pageRef.getParameters().put(PARAM_DSEID, '0');
pageRef.getParameters().put(PARAM_SOURCE_ID, this.anOpportunity.Id);
pageRef.getParameters().put(PARAM_CRL, this.getCRL());
pageRef.setRedirect(true);
return pageRef;
}
private String getCRL()
{
return 'Email~' + anOpportunity.Payer_Email__c +
';FirstName~' + anOpportunity.Payer_First_Name__c +
';LastName~' + anOpport`enter code here`unity.Payer_Last_name__c +
';RoutingOrder~1;Role~Pay`enter code here`er;';
}
}
在此先感谢
我无法编辑托管软件包 –
@SimonasBalcius是否能够找到解决方案? –