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
samanth kumar 11samanth kumar 11 

admin name change

hi, i have a scenario

please help me out

i want to change opportunity owner name based on another object field name. 

In opportunity i have a picklist list field that is realated to custom object. if i select a record in custom object in the custom record name become the opportunity field record name.

here the problem i have to work with three objects one opportunity, custom object and user object.

can any one help to solve this issue
David ZhuDavid Zhu
I would suggest using 'AFTER update' and 'AFTER Insert' trigger on your custom object.
Nicole Cariello 5Nicole Cariello 5
Have you thought about using a workflow to accomplish this? You could create the workflow to update a field based off of the record type you choose
samanth kumar 11samanth kumar 11
hi nicole,

Thank you for responce. I tried with work flow but it is not working for look up relation.
samanth kumar 11samanth kumar 11
Hi David,

I tried with with all the trigger but here porblem is relation did n't work

list< custom_object__c) = select user.name__c from custom_object__c

here it shows error
David ZhuDavid Zhu
'NAME' is a standard field for User object.
list< custom_object__c) = select  from custom_object__c