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

Formula Field

I want to create a formula to subtract the value of a field titled 'Number of Patients on List' (in Opportunities) from a field titled 'Number of Patients' (in Accounts).

The problem is I can only see the field 'Number of Patients' when creating the formula and not 'Number of Patients on List' as it is in Opportunities and not Accounts. Is there anyway to get access to an Opportunity field in Accounts for the purpose of the formula?

I have tried referencing it as $Opportunity.Number_of_Patients_on_List__c but it is not recognised when I check the syntax.

Is there a way to do a cross-object formula?


Where are you adding the formula field - to accounts or opportunities?


Cross-Object Formula is possible from opportunity to Account only. If you want to use the Cross-Object Formula from Account to Opportunity then you need to create a relationship between the two. You can create a custom lookup relationship from Account to Opportunity. If relationship is already there then modify the formula like this :




Did this answer your question? if so, please mark it solved.