+ Start a Discussion
sebascansecosebascanseco 

Cross object formula not returning Person Account Name just Business Account names

I have Account object, Policy custom object and Receipt custom object. The relationships between these are:

 

Account 1:N Policy

Policy 1:N Receipt

 

I have a formula field called 'Account' on Receipt which displays the Name field of the Account related to the Policy in question. Somehow the following formula field:

MyApp__Policy__r.MyApp__.Name

is only working for regular Accounts not Personal Accounts.

I could edit the formula to something like:

 

IF(MyApp__Policy__r.MyApp__Account__r.IsPersonAccount, 
 MyApp__Policy__r.MyApp__Account__r.LastName & ' ' &  MyApp__Policy__r.MyApp__Account__r.FirstName, 
MyApp__Policy__r.MyApp__Account__r.Name)

But it seems to be a lame solution. Anybody knows the reason why this formula doesn't work for Personal Accounts?

Best Answer chosen by Admin (Salesforce Developers) 
Shannon HaleShannon Hale

I just verified that this has been happening for several releases. We probably won't get to it for Summer '13, as code freeze is coming up quickly, but I've got it in my backlog for the next release.

All Answers

Shannon HaleShannon Hale

Hmm... I would expect that to work. It's not restricted to cross-object formulas either, it happens whenever referencing Name on a person account. The UI and API return the expected value.

 

I'm checking with my team to see if there's a technical reason this isn't implemented in the formula engine, but it sounds like a bug -- and if not a bug, then a gap we should fix. Thanks for bringing it to my attention.

 

Until we can fix it, I'm afraid your workaround is probably the best solution.

sebascansecosebascanseco

Thank you Shale, I've implemented the fix I suggested but will appreciate your feedback on this topic as soon as you have something to share with us.

Shannon HaleShannon Hale

Of course, I'll let you know.

Shannon HaleShannon Hale

I just verified that this has been happening for several releases. We probably won't get to it for Summer '13, as code freeze is coming up quickly, but I've got it in my backlog for the next release.

This was selected as the best answer
sebascansecosebascanseco

Great, I will keep using the woraround we talked about and apply the changes once this is fixed.

Grant MannGrant Mann
I am still having this exact same issue now. Was this ever fixed?
Mike ArthurMike Arthur
Seems it is still the case that you need to concatenate first and last names to get person account name in a formula field :-(