You need to sign in to do that
Don't have an account?
mw6
Trigger to populate lookup field on custom object from contact
I have a custom object called 'Class_Allocation__c' and have a lookup field on this object called 'Related_Contact__c. I need expert help to write a trigger on Class_Allocation__c to auto copy the contact Id into this field based on 'Student__Name__c' field on Class_Allocation__C and Student_id_from_Student_object__c (on contact)
May I suggest you please check with below link from stack exchange community exactly with a similar issue and a suggested workaround.
Please tweak the below code as per your requirement which will guide you further. For more information please check with below post.
https://salesforce.stackexchange.com/questions/60308/trigger-to-populate-contact-lookup-on-custom-object
Hope this helps.
Please mark this as solved if it;s resolved.
Thanks,
Nagendra
Trigger to populate Contact lookup on a custom object.please refer the below link for reference.
- https://salesforce.stackexchange.com/questions/60308/trigger-to-populate-contact-lookup-on-custom-object
hope it will be helpful.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar