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
CFlevarisCFlevaris 

Cross Object Reference and Formula

Hello!
 
I cannot find anything in your help pages referring to this so I logged a case. They couldn't answer, they said the question required a hire level of expertise, and suggested I post here. 

I would like to know how to reference a field in another object record within the same account.

I have a formula in a custom field that is calculated to give value to one of my fields in the ASSET object. It figures out that if the expiration date for an asset is greater than TODAY() then it is covered under the support agreement, else it's not. This is the formula:
IF( Expiration_Date__c > TODAY() , "Yes", "No")

That's great, but the expiration dates that I want to upload will not be manually entered in the asset.
There will be a field in a contract that defines the expiration date
We have an object called CONTRACT where these details are uploaded.  Within the same account (that owns the asset) I want to use the expiration date defined in a field in the contract record.
 
I want to grab the value of Expiration_Date_c in a CONTRACT record if there is not one in Expiration_Date_c in the ASSET record and execute my IF statement.

In the forumula above, Expiration_Date_c comes from the ASSET object not the CONTRACT object within the same account. I want to connect the two in a new formula.
That formula should read, in pseudo code:

IF ASSET.Expiration_Date_c != <Blank> then
IF( ASSET.Expiration_Date__c > TODAY() then Yes else No)
Else
IF( CONTRACT.Expiration_Date__c > TODAY() then Yes else No)
Else
No


How can I do this?
Thanks,
Constantine
MarkTNMarkTN
I have a very similar issue so I'm posting here as well.
 
I have a custom object that is related to the Contact object.  I am attempting to create validation rules to lock down fields, or require fields, on the Contact if a range of picklist values are choosen on the related custom object.  I cannot find a way to reference the custom object, or any other object in my formula.
 
I have research and noticed that several people have asked similar questions, but have yet to see a response that either confirms or denies that cross referencing objects is possible with a custom formula.
 
Thanks to anyone who can assist,
Mark
 
CFlevarisCFlevaris

It was suggested to me in another post that I create a lookup relationship between the objects in question, and I'm still trying to figure that one out, so check my other discussion:

http://community.salesforce.com/sforce/board/message?board.id=general_development&thread.id=19553