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
figdot1figdot1 

Custom object child - Can only retrieve business account name

We use Person Accounts 

A new custom object which is a child of opportunity exists (Receipts) 

Within Receipts I have defined a new formula field to return Account Name (using opportunity__r.Account.Name)

This works when the account is a business account. For a person account no value is returned.

Can anyone cast light on this please ?

 

Anthony  

Best Answer chosen by Admin (Salesforce Developers) 
matermortsmatermorts

Not sure why your formula isn't returning data. Opportunity__r.Account.Name works in my org. You could try getting the first and last names individually, and then concatenating them if needed.

 

i.e. Opportunity__r.Account.FirstName + Opportunity__r.Account.LastName

All Answers

matermortsmatermorts

Not sure why your formula isn't returning data. Opportunity__r.Account.Name works in my org. You could try getting the first and last names individually, and then concatenating them if needed.

 

i.e. Opportunity__r.Account.FirstName + Opportunity__r.Account.LastName

This was selected as the best answer
figdot1figdot1

Thanks for the suggestion which worked out well. Still no idea why in my org my original code doesn't work. As usual with SF bugs no time to check and play.... :-)

sebascansecosebascanseco
Any clues on why the original formula didn't work for Personal Accounts? I'm runnning into the exact same problem here.