2017-04-10 43 views
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;'; 
    } 
} 

在此先感謝

回答

0

經過一番研究,你可能必須進行遠程操作方法全球。介紹你的音頻頁面代碼?

+0

我無法編輯託管軟件包 –

+0

@SimonasBalcius是否能夠找到解決方案? –

相關問題