You need to sign in to do that
Don't have an account?
BigP
Can someone please help me creating this apex trigger?
We must have a Job object (Job__c) created that will have a Status picklist field with values Budget, Brief, First presentation, Backlog, Closed, Lost. If we have the object Job that is linked to an account, and this account does not have a Sales Partner (it is empty) but the Job has a Sales Partner field , then when the Job goes to Backlog status, the linked Account that had a sales partner, will receive as Sales Partner that Job has.
Try with below trigger code.
Replace the object API names and field API names as per your org.
Let me know if any issues.
If this helps, Please mark it as best answer.
Thanks!!
All Answers
What is the data type of Sales Partner field in Account & job__c object?
as per my understanding, when job record created and its linked to account, if account dont have the value for Sales Partner field then it should autopopulated from job record to account record? Am i correct.
Thanks!!
Sales Partner should be lookup user data type.
Yes it should autopopulate from job record to account record.
Try with below trigger code.
Replace the object API names and field API names as per your org.
Let me know if any issues.
If this helps, Please mark it as best answer.
Thanks!!