繁体   English   中英

在Salesforce Lightning中自定义“使用Docusign发送”

[英]Customize “Send With Docusign” in Salesforce Lightning

通过在SF Classic中设置CRL参数,我能够使用javascript按钮预填充收件人列表。

现在我想在Lightning中实现同样的目标。 我尝试创建一个VF页面,将用户重定向到dsfs__DocuSign_CreateEnvelope页面并添加所需的ur参数(很像JS按钮)。 它部分工作 - 它预先填充收件人列表,它允许发送电子邮件。 但最终抛出一个错误:“ 没有为受控的dsfs.EnvelopeController生成Javascript代理:可能不会在iframe中使用公共远程方法

在闪电中实现这种功能的正确方法是什么? 它甚至可能吗?

更新: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;';
    }
}

提前致谢

经过一些研究,您可能必须使您的远程操作方法全局化。 介意发布您的VF页面代码?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM