1

I have a custom button and have the following code so that a docusign envelope can be initiated.

Current code works:

{!URLFOR("/apex/dsfs__DocuSign_CreateEnvelope",null, [sId=Legal_Contract__c.Id,ecId="a1Kn0000000AMKcEAO"])}

But I need it to pick between two actions depending on the value of a field. Not working though.

{!IF( Legal_Contract__c.Parent_Company_LC__c = "A",

{!URLFOR("/apex/dsfs__DocuSign_CreateEnvelope",null, [sId=Legal_Contract__c.Id,ecId="a1Kn0000000AMKcEAO"])}

, 

{!URLFOR("/apex/dsfs__DocuSign_CreateEnvelope",null, [sId=Legal_Contract__c.Id,ecId="a1Kn0000000AMKhEAO"])}

)}

Nothing happens when I use the second code. Any idea how to fix it?

1

You don't have to use {!Experession} inside your if-true and false block.

{!IF( Legal_Contract__c.Parent_Company_LC__c = "A",

URLFOR("/apex/dsfs__DocuSign_CreateEnvelope",null, [sId=Legal_Contract__c.Id,ecId="a1Kn0000000AMKcEAO"])

, 

URLFOR("/apex/dsfs__DocuSign_CreateEnvelope",null, [sId=Legal_Contract__c.Id,ecId="a1Kn0000000AMKhEAO"])

)}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.