function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pschifflipschiffli 

Custom formula field that will auto populate industry based on account page industry

Hello,

 

I need some help creating a custom formula field that will auto populate the industry text area based on the account page industry selection associated with the opportunity.  I have a Opportunity page layout that I need to link the industry fields together on, but I have no idea how to get the formula written to have that data from the industry field on the account page to pull into the opportunity page.  Can anyone help me with this?

 

Thank you

 

Best Answer chosen by Admin (Salesforce Developers) 
Kent ManningKent Manning

I would use a lookup formula field on the Opportunity. 

 

Go to your opportunity page and create a new custom field.  Select the Formula radio button as the Data Type. In the next step make the Formula Return Type equal to Text.  Then under the Advanced Formula tab, use the Insert Field button to insert the lookup object using the following steps. 

 

-In the first column, select Opportunity >. 

 

-In the second column select Account > (make sure you select the Account with the ">" symbol). 

 

-In the third column, select Industry. 

 

-In the final column select the Insert button to insert the formula. 

 

Now since the Industry field on account is a drop down list, you will need to encase the "Account.Insdustry" within a Case statement as follows:

 

Opportunity Industry =

 

Case(Account.Industry, "Academic", "Academic", "Value2", "Value2 result", "value3", "value3 result", "else result" )

 

This will be a read only field on your Opportunity page, so it will not show up when somone is editing the page, but it will show up on the detail page.

 

Hope that helps.

 

 

 

 

All Answers

Kent ManningKent Manning

I would use a lookup formula field on the Opportunity. 

 

Go to your opportunity page and create a new custom field.  Select the Formula radio button as the Data Type. In the next step make the Formula Return Type equal to Text.  Then under the Advanced Formula tab, use the Insert Field button to insert the lookup object using the following steps. 

 

-In the first column, select Opportunity >. 

 

-In the second column select Account > (make sure you select the Account with the ">" symbol). 

 

-In the third column, select Industry. 

 

-In the final column select the Insert button to insert the formula. 

 

Now since the Industry field on account is a drop down list, you will need to encase the "Account.Insdustry" within a Case statement as follows:

 

Opportunity Industry =

 

Case(Account.Industry, "Academic", "Academic", "Value2", "Value2 result", "value3", "value3 result", "else result" )

 

This will be a read only field on your Opportunity page, so it will not show up when somone is editing the page, but it will show up on the detail page.

 

Hope that helps.

 

 

 

 

This was selected as the best answer
pschifflipschiffli

That is an awesome plan!  Thank you so much for being so detailed in your response.  As a new admin, that is exceptionally helpful.  I am working on it currently, so I will let you know how it turns out.

 

Thanks again!

 

Patrick

pschifflipschiffli

That did it and it works great!  Thank you so much for your time and effort on helping me out.

 

Have a great week!

Kent ManningKent Manning

Glad it worked! 

 

The cross object formula fields are a recent addition to Salesforce and I think it is on of the greatest improvements that they have made.  It really simplifies things like this.

 

Kent

 

pschifflipschiffli

It is a great functionality.  I am glad it worked too.  You made it so simple.  Thanks for that!

 

Take care and I look forward to speaking with you in the future, 

 

Patrick

AdzimmerAdzimmer

I am trying to create a custom formula to populate the Contact Record Address to an Activity such as an event.  I have tried improvising from your steps provided for the Opportunity field, but am missing some aspect.  I just need the address from the contact to populate to an event so that when SalesForce Events are pushed to a Outlook Calendar their is a mapping field for the location of the meeting.

 

If you can assist it would be greatly appreciated, Thanks.