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
fbjeanfbjean 

Novice question

I have a Date  filed name "Contract End Date" in my Asset Object.

 

I need this field to be synchronize with a date field ( Max Support)  on my account tab. So the account field is just a copy off the field in the asset.

 

I try to create a formulas like

 

 Max Support (Date) =$asset.Contract_End_date__c

 

but always get : Error: Field $asset.Contract_End_date__c does not exist. Check spelling.

 

thanks

Best Answer chosen by Admin (Salesforce Developers) 
fbjeanfbjean

thanks you all.

 

Since I will have near 400 asset by account I don't want to associate one asset in particular with this account fields.

Also, since I will import this fields on a regular base, I will change my SQL export to include this date in the account export  intead  

of the asset export.

 

regards, francois

All Answers

jldenningjldenning

Have you tried this?

 Max Support (Date) = asset__r.Contract_End_date__c

fbjeanfbjean

Here is what I get:

 

Error: Invalid Data.
Review all error messages below to correct your data.
Field asset__r does not exist. Check spelling.
ngabraningabrani

Asset is a standard object. It has a field called AccountId that contains the account id. The api documentation for Asset is included in the link below -

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_asset.htm#topic-title

 

One option will be to develop a trigger that will get the account id for the asset. Then do a SOQL query to get the account object from the id. Then assign the Contract End Date field of the asset object based upon the relevant field of account object.

Imran MohammedImran Mohammed

You can also create a lookup from Asset object to Account and then use the Formula.

fbjeanfbjean

thanks you all.

 

Since I will have near 400 asset by account I don't want to associate one asset in particular with this account fields.

Also, since I will import this fields on a regular base, I will change my SQL export to include this date in the account export  intead  

of the asset export.

 

regards, francois

This was selected as the best answer