+ Start a Discussion
ankur khattriankur khattri 

in trigger i want 2 assign value in ank_kha__c= 1030 Garhi and it is a lookup field of Account.Object name is Ankur__c.

ajay rawat 14ajay rawat 14
Hi Ankur
            First you need to get record id by using soql
ID accountId = [SELECT ID FROM WHERE Ankur__c='1030 Garhi' limit 1].id;
then assign this id to lookup field
objectInstance.ank_kha__c = accountId;

Thanks and Regards,
Ajay Rawat