Ask Search:
Stephen ParkinsonStephen Parkinson 
I posted a similar question a few days ago but feel like I haven't explained it clearly so I will try again.

On the opportunity record we have the following fields

Opportunity Country - single picklist field
Product Type - also a single picklist field (not part of the Opportunity Product object)

I need to create a validation rule to prevent opportunities being created in countries where specific product types are not legally registered. I have a big Excel sheet with all countries served and which products we have legal approval to sell. So for example

Opportunity Country = UK
Product Types allowed to sell = Product A and Product B

Opportunity Country = USA
Product Types allowed to sell = Product Type = A, Product Type = B and Product Type = C

Please could someone try to explain the syntax required to get this Validation Rule up and running?

Many thanks

Stephen
Best Answer chosen by Stephen Parkinson
Minkesh patelMinkesh patel
Hi Stephen,

Actully, this is dependent picklist query , you can solve easily . learn below link:
https://help.salesforce.com/articleView?id=fields_defining_field_dependencies.htm&type=0

Thanks,
Minkesh
Debbie StapletonDebbie Stapleton 
I have created an email template which is part of an Approval Process. All merge fields are working on the first 3 templates but on the final approval email the merge fields (highlighted in yellow) are not showing on my email. I also tried to add the detail link and that did not show up as well. Can someone help

User-added image
Best Answer chosen by Debbie Stapleton
Debbie StapletonDebbie Stapleton
Ok I just managed to fix my own issue with the highlighted merge fields missing. when I copied over the Merge field "Rating recommendation I missed copying over the closed bracket. All working now.
Nicholas BartonNicholas Barton 
I am trying to create a Contact Validation Rule that meets the following Criteria:

"For contact's whos accounts are located in Orlando, FL and 'Email Opt Out' is checked, the 'Email' field MUST be deleted if it contains ".edu" or ".org" unless the Contact's Birthdate is before 01/01/1982."

1) Account is in Orlando, FL
2) Email Opt Out = True
3) Email Contains ".org" or ".edu"

Unless the Contact's Date of Birth is before 1982.

Here is what I've come up with on my own, and no Syntax errors appear when I check, but I still do not receive the error message when I change a contact record's 'Email Opt Out' to True, and save the record.

AND( 
HasOptedOutOfEmail = TRUE, 
Birthdate > DATE(1982,01,01), 
CONTAINS(".edu", Email)|| CONTAINS(".org", Email), Account.BillingCity = "Orlando")
 
Best Answer chosen by Nicholas Barton
Ahilesh RagavanAhilesh Ragavan
Hello Nicholas,

You were almost there,except for the CONTAINS syntax.
Use this,it should work.
AND(
HasOptedOutOfEmail = TRUE,
Birthdate > DATE(1982,01,01),
CONTAINS(Email,".edu")|| CONTAINS(Email,".org"),
Account.BillingCity = "Orlando")
 
Ryan MolineRyan Moline 
I initially built this using CONTAINS but it said LeadSource is a picklist and requires PICKVAL. Swapped it out and still no luck. Any advice?

IF( 
PICKVAL(LeadSource, 'Existing Customer'), 'Existing Customer', 
IF( 
PICKVAL(LeadSource, 'Sales Team:Direct - Cold Call/Email:Outbound Calling:Sales Event:Sales Team'), 'Sales Prospecting', 
IF( 
PICKVAL(LeadSource, 'Employee Referral:Referral:Referral List:'), 'Referral')))
IF( 
PICKVAL(LeadSource, 'Partner:Partner Generated Opp:DealGuard Registration:Partner Events'), 'Partner' 
IF( 
PICKVAL(LeadSource, '(blank)'), 'TBA', 
IF( 
PICKVAL(LeadSource, 'Email:Email Campaign:Event:Inbound Call or Email:Intent:List:RainKing:Sales Team:SuperGuide:Survey:Tile:Trade Show:Webinar:Website:Website Chat:Hero_Banner:Content Syndication:Jigsaw:Lead Entry Form:Purchaed List'), 'Marketing','Other')))))))))))))))
Best Answer chosen by Ryan Moline
Sunil SarillaSunil Sarilla
Hi Ryan,
Please try the below
CASE(LeadSource,
'​Existing Customer','Existing Customer',
'Sales Team', 'Sales Prospecting',
'Direct - Cold Call/Email', 'Sales Prospecting',
'Outbound Calling', 'Sales Prospecting',
'Sales Event', 'Sales Prospecting',
'Sales Team', 'Sales Prospecting',
'Employee Referral','Referral',
'Referral','Referral',
'Referral List','Referral',
'Partner','Partner',
'Partner Generated Opp','Partner',
'DealGuard Registration','Partner',
'Partner Events', 'Partner',
'(blank)','TBA',
'Email','Marketing',
'Email Campaign','Marketing',
'Event','Marketing',
'Inbound Call or Email','Marketing',
'Intent','Marketing',
'List','Marketing',
'RainKing','Marketing',
'SuperGuide','Marketing',
'Survey','Marketing',
'Tile','Marketing',
'Trade Show','Marketing',
'Webinar','Marketing',
'Website','Marketing',
'Website Chat','Marketing',
'Hero_Banner','Marketing',
'Content Syndication','Marketing',
'Jigsaw','Marketing',
'Lead Entry Form','Marketing',
'Purchaed List','Marketing',
'Other'
)

If you want to Use Contains function, the syntax will be below, i am just showing using couple of IF's, you will need to extend the below formula
IF(
CONTAINS('Email:Email Campaign:Event:Inbound Call or Email:Intent:List:RainKing:Sales Team:SuperGuide:Survey:Tile:Trade Show:Webinar:Website:Website Chat:Hero_Banner:Content Syndication:Jigsaw:Lead Entry Form:Purchaed List', TEXT(LeadSource)),
'Marketing',
IF(CONTAINS('Partner:Partner Generated Opp:DealGuard Registration:Partner Events',TEXT(LeadSource)),'Parnter','Other'))

 
Ashish kumarAshish kumar 
hello,

I want to inculde that system adminstraotors should be able to go back in the lead status in the formula below. 

CASE( PRIORVALUE(Status) , 
"Suspect",1, 
"Raw Lead",2, 
"MQL",3, 
"SDR - Attempted",4, 
"SDR - Working",5, 
"TSQL",6, 
"PQL",7, 
"Sales - Reviewed",8, 
"Sales - Working",9, 
"New Opportunity",10, 
"Existing Opportunity",11, 



CASE( Status , 
"Suspect",1, 
"Raw Lead",2, 
"MQL",3, 
"SDR - Attempted",4, 
"SDR - Working",5, 
"TSQL",6, 
"PQL",7, 
"Sales - Reviewed",8, 
"Sales - Working",9, 
"New Opportunity",10, 
"Existing Opportunity",11, 
99 
)

Thank you. 
Best Answer chosen by Ashish kumar
Deepak AnandDeepak Anand
Like this = 
AND(
    $Profile.Name <> "System Administrator",
    CASE(
        PRIORVALUE(Status), 
        "Suspect",              1, 
        "Raw Lead",             2, 
        "MQL",                  3, 
        "SDR - Attempted",      4, 
        "SDR - Working",        5, 
        "TSQL",                 6, 
        "PQL",                  7, 
        "Sales - Reviewed",     8, 
        "Sales - Working",      9, 
        "New Opportunity",      10, 
        "Existing Opportunity", 11, 
        0 
    ) 
    > 
    CASE(
        Status,
        "Suspect",              1, 
        "Raw Lead",             2, 
        "MQL",                  3, 
        "SDR - Attempted",      4, 
        "SDR - Working",        5, 
        "TSQL",                 6, 
        "PQL",                  7, 
        "Sales - Reviewed",     8, 
        "Sales - Working",      9, 
        "New Opportunity",      10, 
        "Existing Opportunity", 11, 
        99 
    )
)
Wendy CongletonWendy Congleton 
The field I want to check against has a number of values (12 currently but it could grow) that start with the same 3 letters and any of those would meet my criteria. I select the field and operator Contains, but then in the Type string is no longer available.  And if I use picklist, I can't select a value and delete the items other than the first 3 letter.  Even if I choose Starts with the String option is not available. 

I don't want to have to add a row for each value since we will add more items to this list that meet these specific criteria and that would be required updates to this process. 

Type options if the Operator is Starts with or Contains

My criteria to start the process is that my this field value starts with or contains MMU.  
User-added image

Any help if greatly appreciated. 
Best Answer chosen by Wendy Congleton
Deepak AnandDeepak Anand
How about trying a Formula instead of  Set Conditions - 
BEGINS(TEXT([EnrolmentrxR.....].Picklist_Field__c), "MMU")

That should do it.
RICKY ZABANEHRICKY ZABANEH 
Hi there,
I've been asked to reduce the character limit of a open text field from 1,000 to 255. I know how to do this, but would like to verify the risks for doing so.

If changed,
Any data past 255 characters will be lost, meaning that any text past 255 characters will be deleted, correct?

If the above is correct, I need to export the data and consolidate those that go over 255, change the limit of the field, and perform the upload.

Please let me know if I'm going in the right direction.
Best Answer chosen by RICKY ZABANEH
Mayank SrivastavaMayank Srivastava
Ricky, your understanding is absolutely correct. In order to preserve any field data beyond 255 characters, I would definitely recommend keep an export backup in case it's ever needed by someone in the future.
And of course, data consolidation needs to be done as well which you are already aware of.
Emily CiesielskiEmily Ciesielski 
I'm looking to change a custom lead field from a text field to a picklist. When I try to update the record type I get an error message because that field is mapped to the account page. I tried to update the field to a picklist on the account page first, but that didn't work either. Any ideas?
User-added image
Best Answer chosen by Emily Ciesielski
Ahilesh RagavanAhilesh Ragavan
Hello Emily,
It looks like you are using the text field in the Lead Conversion mapping.You need to remove the lead mapping before changing the data type to picklist.

Setup>>Lead Fileds>>"Map Lead Fields" button
User-added image
Arun ViswanathanArun Viswanathan 
I've built a workflow that updates a field on the Account object with the value from a child object (Address).  So anytime an address is created and has a checkbox field checked, the phone number from there is copied to the Account phone numbers (intentionally not using Phone and Fax on Account objects).  An account can have multiple address records which is why the use of the checkbox.  Is it possible to have the workflow triggered if the Address phone number is changed?

For example, when the record is created with 555-876-9876 it is copied to the field on the account.  However, if the phone number is edited to 555-123-6574 how can I get that copied over as well?
Best Answer chosen by Arun Viswanathan
Mayank SrivastavaMayank Srivastava
Arun, why not change the workflow rule criteria to something like this:
AND(
  Checkbox__c = TRUE,
  NOT(ISBLANK(Phone_Field__c)),
  OR(
     ISNEW(),
     ISCHANGED(Phone_Field__c)
    )
)

That's it!
Sophie HedgerSophie Hedger 
Hey community,
How can I make sure that if any of three values in a picklist are selected, a text must have value in at all times; for all records.

Picklist is State__c
Text is Details__c

Thank you!!
Best Answer chosen by Sophie Hedger
Mayank SrivastavaMayank Srivastava
+1 Steve, 
Remember that the picklist values are case sensitive and should be written exactly the way they appear on the picklist.
Also, if details is a rich text, use this:
AND(
  CASE(
      State__c, 
      "Active", 1,
      "Inactive", 1,
      "Archived", 1,
      0
  ) = 1,
  LEN(Details__c) = 0
)