0

I have 2 objects: Object A and District_Stats__c. There are 4 useful fields in District_Stats__c: District_Num__c, Month__c, Year__c, District_Rev__c.

In Object A, I have District_Num__c, Month__c and Year__c along with other fields.

Is there a way to create a formula or a lookup field which would map the District_Rev__c from District table to Object A? Thanks..

1

If you're happy creating a lookup from an Object A record to District_Stats__c then you can just use a formula along the lines of:

District_Stats__r.District_Rev__c

Where Distrit_Stas__r is the relationship name of the lookup field. Given that you have year month etc. on Object Ait sounds like this solution would work.

If however, you didn't want a lookup for some reason you could create a corresponding field on Object A and populate that with a trigger before insert/update based the values of the other fields.

0

YOu can create a lookup field in the object A which looks up to the District_stats__c object. Once that is done, then you could create a formula field in the object A with formula District_stats__c.District_Rev__c, this field will reflect the value that is in the district_stats__c records which is added as a lookup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.