You need to sign in to do that
Don't have an account?
Benjamin Bolopue
Trigger to Update Lookup Field based on Picklist Selection
Hello All,
Understanding full well that back in February, a similar question was posted by DannyTK, (https://developer.salesforce.com/forums/?id=906F0000000Abrg#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F0000000AyhxIAC" target="_blank) My scenario is slightly different, and I'm no developer. Any insight the community has to offer would be greatly appreciated! Here are the details:
1.) I'm working on a project that requires my Users be able to update a Lookup field (Owner__c) via a picklist selection.
2.) I have a simple formula field (Re_Assigned_To_ID__c) that produces a User ID based on the selection made via item 1's picklist.
3.) Owner__c and Re-Assigned_To_ID__c are custom fields on a custom object named NPS_Survey__c
4.) I think (please correct me if I'm wrong!) I need a trigger that fires when Re_Assigned_To_ID__c is changed and uses Re_Assigned_To_ID__c's value ( a User's ID) to update the Owner__c (Lookup field) value.
Thanks for your time!
Ben
Understanding full well that back in February, a similar question was posted by DannyTK, (https://developer.salesforce.com/forums/?id=906F0000000Abrg#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F0000000AyhxIAC" target="_blank) My scenario is slightly different, and I'm no developer. Any insight the community has to offer would be greatly appreciated! Here are the details:
1.) I'm working on a project that requires my Users be able to update a Lookup field (Owner__c) via a picklist selection.
2.) I have a simple formula field (Re_Assigned_To_ID__c) that produces a User ID based on the selection made via item 1's picklist.
3.) Owner__c and Re-Assigned_To_ID__c are custom fields on a custom object named NPS_Survey__c
4.) I think (please correct me if I'm wrong!) I need a trigger that fires when Re_Assigned_To_ID__c is changed and uses Re_Assigned_To_ID__c's value ( a User's ID) to update the Owner__c (Lookup field) value.
Thanks for your time!
Ben
You can try this code:
Thanks,
Neetu
Thanks,
Neetu