You need to sign in to do that
Don't have an account?
Magnetism
Auto populate a field with a field from another object which is ls also a lookup field in another object
I am trying to crate a field on a custom object B and trying to populate that with a custom field value on Account object. that field on Account is a look up on the user object. I am using a trigger to do this, help needed to know how to relate these object records to assign the value to the auto populate field. Also what would be the best type to create this field type to be?
post what code you have so far as well so i can understand when you want object b populated - i.e. when the account is inserted/deleted or when object b is inserted/deleted
thanks
dan
Object B -> Account -> User
If this is correct,you need to query the related field value in SOQL using relationship field in you Trigger and then you can populate your custom object B record.
Go through the below link to learn about SOQL relationship query :-
http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm
Hope this helps !!