Skip to main content The new Salesforce certifications experience is live! Visit Trailhead Academy to explore your new certifications homepage.
Hi,

 

Currently our Opportunity Name is Close Date, Primary Contact First and Last Name, "Donation".

 

TEXT( CloseDate ) & " " &  npsp__Primary_Contact__r.FirstName & " " &  npsp__Primary_Contact__r.LastName & " Donation"

 

We would like to rename our Opportunity so that if the donation is from a Contact the Primary Contact First and Last Name appears but if the donation is from an Account the Account Name appears.

 

How do I modify the rule? I'm unsure what fields to put in. I think it will need an IF statement but not sure what else to do.

 

Thanks in advance,

 

Melinda
2 answers
  1. Sep 11, 2017, 11:07 AM
    Hi Melinda,

     

    Try this:

    IF( AccountId  = null && Contact__c != null, TEXT( CloseDate ) & " " & Contact__r.FirstName & " " &  Contact__r.LastName & " Donation", 

    IF(AccountId  != null && Contact__c = null, TEXT( CloseDate ) & " " & Account.Name & " " & " Donation",'None'))

     

    Thanks,

     

    Ankur Saini

     

    http://mirketa.com
  2. Sep 11, 2017, 7:06 AM
    Hi Melinda, 

     

    Yes, you will need to put an IF condition, but what is the condition you should be aware. How does your business know that if payment has been made by Primary contact or an Account? 

     

    I think it could be:

    •  if Primary contact is not null, then payment should be considered that it is done by Primary Contact else it is done by Account. 
    • Or if there is a check box on Opportunity which tells us this confirmation. 
    • Or there are some other criteria.

     

    Once you tell me these criteria, then I can help you in the new formula.

     

    Thanks

     

     
0/9000