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
OxeneOxene 

Merge field with custom object

I'm trying to create a merge field in a custom object A that refers and gets value from another custom object B. I'm not able to get this value in objectA, but i'm able to get values for similar fields on standard object Account.

In short, i'm able to get 'C_Account__r.Name' in the formula field but not 'C_Partner__r.Name__c' where Account and Partner objects are related to custom object A through lookups. Here Account is the standard object and Partner is a custom object

Can anybody help me out?
shillyershillyer

If Custom Object A and B have a relationship between them, then you can create a cross-object formula field on Custom Object A that pulls data from a field on Custom Object B. Then your merge field on Custom Object A will be this new formula field.

Hope I didn't confuse you. :-)

Best,

Sati

OxeneOxene
Thanks Shillyer for the reply.
 
I know that I should be able to get this value using cross object reference formula fields but i'm able to get it only from standard objects like Account. If I try to get similar value from a custom object related to the custom object on which i'm currently working, i'm not able to retrieve that value in the formula field.
 
 
anup_aanup_a
Cross object formulas will work only if there is a master-detail relationship between the 2 objects. In your case, if there exists a master detail relationship b/w objects A & B, then such a field can be created, even though the objects are custom.
OxeneOxene
Thanks for the reply Anup. I have got it working. I was not populating the lookup field in the s-control. Its working after i populate the lookup field with the id in s-control.