You need to sign in to do that
Don't have an account?
Robert Wynter
adding a multi-picklist field into my formula for my custom button
I have a custom button that has a javascript picklist that checks feild criteria. I need to add a multi-picklist field to the if statement to check if it does NOT contain "India".
and here's the full syntax if needed:
if('{!Account.Original_Contract_Start__c}' == '' || '{!Account.Current_Contract_Start__c}' == '' || '{!Account.Contract_End__c}' == '' || '{!Account.Status__c}' != 'Active' || {!INCLUDES(!Account.Target_Market__c, "India") == False } ) {
and here's the full syntax if needed:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} if('{!Account.Original_Contract_Start__c}' == '' || '{!Account.Current_Contract_Start__c}' == '' || '{!Account.Contract_End__c}' == '' || '{!Account.Status__c}' != 'Active' || {!CONTAINS(!Account.Target_Market__c, "India") == False } ) { window.alert("Hello {!$User.FirstName} Please make sure you have entered the values in Contract End, Original Contract Start and Current Contract Start fields and that the Account Status is Active"); } else if('{!Account.Status__c}' == 'Active' && '{!Account.Approval_Progress__c}' == 'Closed Won') { window.open("/apex/echosign_dev1__AgreementTemplateProcess?masterid={!Account.Id}&templateId=a08o000000C6jYl ","_blank"); } else if('{!Account.Status__c}' == 'Active' && '{!Account.Approval_Progress__c}' == 'Approved') { window.open("/apex/echosign_dev1__AgreementTemplateProcess?masterid={!Account.Id}&templateId=a08o0000004m8XH ","_blank"); }
Thanks,
Parker
Thx for trying though
'{NOT(!INCLUDES(Account.Target_Market__c, "India"))}'
removed the ! from (Account.Target_Market__c
Thanks for posting your question,
Parker
Thanks,
Parker
In other words try something like this (I added a few additional tweaks): Try something similar to that. I doubt that's the 100% perfect syntax, so it'll need some tweaking. Let me know of the results.
Thanks,
Parker
If you want, you can mark your previous answer as best, or whatever suits you best. Translating formulas to non-visualforce script is a challenge for me as I'm just starting with apex code and code in general, so I won't be able to help you there. I'm glad I could help as far as the formula is concerned, but I wish I knew more so I could help you and others better and also for when I want to write my own code. (It's a real pain to know exactly what you want to do, but can't write the script for it.)
Thanks again,
Parker