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
himanshu huske 7himanshu huske 7 

Trigger to populate lookUp Field

There are two Objects:
1.Property__c(obj) with fields Status__c(Picklist) and Ajent__c(lookUp to Contact)
2.Contact (obj)
Contact obj has some records 
if user change status__c of property form 'open' to 'working' the, If that user have a contact record, Agent__c field should get populated with that Contact Name field.  
Christan G 4Christan G 4
Hi himanshu, I don't think a trigger is required for this. It sounds like it can be satisfied using either a flow or process builder instead.
Laxmi Pandey 20Laxmi Pandey 20
Yes, Process builder can help you populate a lookup field. 
himanshu huske 7himanshu huske 7
ya i know it, but want it through trigger.
plese provide me a code