+ Start a Discussion
muneeswar umuneeswar u 

create a Account id and Contact name fields in custom object and in that fields i want to show (standard objects)Account name and its related contact name.How can we achieve this??

Niraj Kr SinghNiraj Kr Singh
Hi Muneeswar u,

If Account id and Contact name are the lookup field you have created, then it will show the "Name" of the record what selected.

And if Account id and Contact name are text field, Then you should write trigger on ur object and read the both field values and do SOQL to get its name update respected value. (Write trigger on before event, where no need to do update dml)

muneeswar umuneeswar u
yes I need Apex code and trigger code for that.plz send any one .Thankyou in advance