[ScenarioSolutionIntro ]
[sc:ScenarioSolution ]
[RCNotLoggedInNotAdmin]
[/RCNotLoggedInNotAdmin]
[RCAdmin]
For this formula, we will need to use a cross-object formula with a TEXT() function to display the values within a picklist.
[sc:ScenarioSolutionSteps ]
Create the formula field on opportunity.
- Navigate to Setup –> Customize –> Opportunities –> Fields
- Click new (to create a new field).
- Select Formula.
Click Next. - Label “Account Type”.
Select Text Return Type. - Click “Advanced Formula Editor”.
Enter formula “TEXT( Account.Type )”.You can create this formula on you own by doing the following:
Switch to the Advanced Formula Editor and then Click Insert Field. Then draw from the functions panel on the right to retrieve the TEXT() function.
When inserting a field, the > after a field (e.g. Account >) indicates referencing another object’s data.
Click Next. - Click Next.
- Click Save.
Formula explained:
TEXT( Account.Type )
To pull in data from the account, use a cross-object reference, in this case Account.Type. As Account.Type is a picklist field, the value it returns to the formula will be a picklist. Since the formula return type is text, we have to translate the picklist value into text. This is accomplished by using the TEXT() function.
[/RCAdmin]
Is it possible to get an Field wih an cross object formula which is the second Relation and not the first.
For example:
Article Quote — 1. Relation M.Detail — Quote –2 Relation M.Detail –Account
I would like to have the Accountname on Article Quote Object.
regards john
Yes formulas can span multiple objects
John, would a look up relationship between Account and Opportunity work in this scenario?
I was wondering the same myself? Unless the formula was the only way to convert the pick list value into something more meaningful, maybe?
Yeah- good question. There is language on the site that describes this phenomenon. Essentially the relationship between account and opportunity is a lookup relationship; however, it is not a “standard” lookup relationship, because it still allows you to create a rollup summary field.
Excellent!
This is probably a dumb question, but why in the formula are we entering the field as “Account.Type” and not, “Account_Type”? I see where you stated, “Account.Type” in the instructions and steps, but the field label is, “Account_Type”. Is this just a basic formula concept I need to learn?
Working through it more and I think I got it. Does “Account.Type” simply mean Account>Type when talking about using the Advanced Formula Editor vs. typing in the formula free hand?
Yep that’s exactly the case
Thanks so much for the quick response. Test is on Friday aaaaack! Great study guide though; it’s saving my hide right now. Big lightbulb moments.
There is a typo in step 5 – It should read “on your own” rather than “on you own.”
step #5 insert field > 1-opportunity 2 account, after that I don’t have the option of next , just close. Also TEXT (account) is not an option. It doesn’t populate onto the page. Thank you.
try manually typing in TEXT(Account.Type). This should work as long as you’re creating a formula field for one of the related objects i.e. Opportunity.
Thanks Karia.
@Erin, if you select Account (without the “>” then it will select the account id, you need to select “Account >” as shown above) – from the advanced formula tab.
Hope that helps!
Choose output type > chosing Text does not give the option of formula return type.