You need to sign in to do that
Don't have an account?
Samyra Chrisp 18
button with nested case statement
I have a button that is working with a fairly simple nested case statement to create echosign documents based on changes in the field region__c:
/apex/echosign_dev1__AgreementTemplateProcess?masterid={!Lead_Appointment__c.Id}&templateId={!CASE(Upper(Text(Lead_Appointment__c.Region__c)),
"HOU", "a03i000000H3qRW",
"SAN", "a03i000000H3qRW",
"AUS", "a03i000000H3qRW",
"DFW","a03i000000LQMc5",
"TYL","a03i000000LQMc5",
"MOD","a03i000000LQMc5","a03i000000H3qRW" )}
"HOU", "a03i000000H3qRW",
"SAN", "a03i000000H3qRW",
"AUS", "a03i000000H3qRW",
"DFW","a03i000000LQMc5",
"TYL","a03i000000LQMc5",
"MOD","a03i000000LQMc5","a03i000000H3qRW" )}
I need to add two additional criteria to the case statement and I'm unsure how to proceed.
If Signers__c =1 and Contracts__c =1 and Region = "AUS", then return specific package
If Signers__c=2 and Contracts__c = 1 and Region ="AUS", then return a different package
If Signers__c=1 and Contracts__c=2 and Region ="AUS", then return a different package
If Signers__c+2 and Contracts__c=2 and Region = "AUS", then return another package.
I need to loop through each of the regions and each Signer/Contract option.
If Signers__c=2 and Contracts__c = 1 and Region ="AUS", then return a different package
If Signers__c=1 and Contracts__c=2 and Region ="AUS", then return a different package
If Signers__c+2 and Contracts__c=2 and Region = "AUS", then return another package.
I need to loop through each of the regions and each Signer/Contract option.
Any advice will be greatly apprecitated.