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
CrystalCrystal 

Error when Adding Custom Forumlas to the Activities Page Layout

I have a custom Object called Private Client Account in this object we store Email and Phone Numbers. My users want to be able to create a new task from this object and pull in the Email and Phone Number just like the email and Phone number is pulled on the Contact tasks and events.
 
Is this possible. I thought I could createa  custom formula on the Task and pull in the Email and Phone Number from my custom object but I keep getting a syntax error that says Error: Field Private_Client_Account__c does not exist. Check spelling.
Its does exist and the spelling is right.
 
What could i be doing wrong? Any othe sugesstions?
 
Private_Client_Account__c.Private_Client_Account_Email__c & ', ' & Private_Client_Account_Home_Phone__c
werewolfwerewolf
You can't do that because that field in fact does not exist.  A Task object has a field called What which is what relates it to other objects (in your case your Private Client Account), but that What field can be related to many different kinds of objects so you can't make assumptions in your formula field about what specific object it's related to.  For example, what would that formula field show if the Task were related to a Case?  Those fields are not defined on Case.

If you want to inherit those details from the parent object upon creation you can create a normal text field or two to store that information, and use an Apex trigger on Activity to pull them from the parent object (the What) if the parent is in fact a Private Client Account.
CrystalCrystal
Sorry - maybe I need to add a little clarification. I do have the fields Email and Home Phone on my parent object (Private client Account).