nbreck

Need help with modifying Salesforce URL Code

0 votes

I am working through the OneSpan tutorial for Automating Transaction Creation in Salesforce in Salesforce Lightning Experience but I am getting hung up in the creation of a field to store the automation URL.

I am unsure where this language is different than other help articles:

<apex:page standardController="Account">

<ESL:PackageAutomation fieldName="Account_Automation_URL__c" />

</apex:page>

This is the code I have for my button, but I cannot get it to work for a formula:

/apex/esl__package
?ParentId={!Term_Sheet__c.Id}
&id={!Term_Sheet__c.Id}
&Documents={Term_Sheet.DocumentId__c}
&ConventionId=a0i4Q00001eDDG0QAO
&Signer1={Sales_Rep_Name__c}
&Signer1Label=a0u4Q00000HWW8hQAH
&AutoPrepare=1
&Signer2={Attach_a_Contact__c}
&Signer2Label=a0u4Q00000HWW8cQAH
&AutoPrepare=1


Approved Answer

Reply to: Need help with modifying Salesforce URL Code

0 votes

Hi nbreck,

 

Thanks for your post!

For example if I have a Detail Page Button with this URL:
/apex/esl__package?ParentId={!Account.Id}&Name={!Account.Name}%20Agreement&[email protected]&Signer1FirstName=John&Signer1LastName=Smith

 

The equivalent formula field named "OSS_Fast_Track_Formula__c" could be like:

"/apex/esl__package?ParentId=" & Id & "&Name=" & Name & "%20Agreement&[email protected]&Signer1FirstName=John&Signer1LastName=Smith"

Note that the formula uses "&" instead of "+" to concatenate the text. You can find more details from SFDC's guide here:
https://help.salesforce.com/s/articleView?id=sf.customize_functions_parent.htm&type=5

 

And you just need to reference the field in the VF page:

<apex:page standardController="Account"> <ESL:PackageAutomation fieldName="OSS_Fast_Track_Formula__c" /> </apex:page>

 

BTW, in your case, is the parent type "Term_Sheet__c"? If that's the case, reference the formula field in a VF page which controller is your custom object.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off