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
Dee Dee AaronDee Dee Aaron 

Looking to reference a value from a related object

Hi there.
I have an object called "Work Orders". I have a related object called "Pre-Work Orders".
I want to reference the custom Status field from the Pre-Work order ON the Work Order record.
I don't know how to do this. Because it's a related object, I don't see any way to access it through the formula builder options?
I believe I can create a "related object" formula like so:

WorkOrder__r.Pre_Work_Order__r.Status__c
I keep getting this: 
Error: Field WorkOrder__r does not exist. Check spelling.
I'm unsure of the correct format I need to reference?
Any help would be appricated. Thank you.

Best Answer chosen by Dee Dee Aaron
Andrew GAndrew G
If the formula field is to exist on the Work Order object, then no need to reference the WorkOrder__r.

Assuming you are on the Work Order and there is a lookup field to Pre_Work_Order with a field name of Pre_Work_Order__c then try
Pre_Work_Order__r.Status__c
regards
Andrew
 

All Answers

Andrew GAndrew G
If the formula field is to exist on the Work Order object, then no need to reference the WorkOrder__r.

Assuming you are on the Work Order and there is a lookup field to Pre_Work_Order with a field name of Pre_Work_Order__c then try
Pre_Work_Order__r.Status__c
regards
Andrew
 
This was selected as the best answer
Dee Dee AaronDee Dee Aaron
Thanks, you solved my problem!