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
sumitasumita 

populating manager fields of owner, in opportunity

Hi,

 

I need to achieve the following:

 

There are 4 fields in Opportunity, namely: manager1, manager2, manager3, manager4.

If an opp is created/edited, these 4 fields are populated in such a way that the owner of the opportunity's manager is filled in manager1, manager1's manager(all taken from user table) is filled into manager2, maintaining the hierarchy and so on..and want these fields editable (formula fields cant be used)..

 

I want to ask that whether this thing can be achieved using salesforce out of the box customisations or a trigger has to be written for that. 

I tried to do this using temporary formula fields and populating the actual fields through a workflow.

but the challenge i faced is that i did it though taking the manager of 'created by', but this wont work in case of data loader. So we hve to use the 'Owner' instead of created by.

 

I hope some intelligent minds wud definitely provide a solution.

 

 

Thanks

~S