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
Laura GilLaura Gil 

Is this cross object formula on Task, Case and User feasable?

Hi all,
I am trying to create a formula illustrating the following situation:

On the standard object User I created a custom field of type Currency. This should contain the costs pro employee say for hour of work.

We have a custom object with which we should be able to track how long it takes for the Owner of a case to work on a case (Team A).
But we also would like to track how long it takes for the Task assignee to work on the Task (Team B). For this we have the field Duration in minutes.
The object is Timesheet__c.

Now I am thinking of a formula doing this:

IF Task --> indicate the AssignedTo in this Task.
           Multiplicate AssignedTo__r.Cost__c X Duration__c
IF Case --> indicate the CaseOwner in this Case.
           Multiplicate CaseOwner__r.Cost__c X Duration__c

where AssignedTo and CaseOwner are lookups to User.
We also have a lookup to the Case object.

The field that should contain the formula is Cost__c on the Timesheet object.

I don't know if my description is understandable. If it is, is such a formula field with that conditions feasable in Salesforce? or should we use a trigger instead?