I am getting the following error
Compile Error: Illegal assignment from String to User at line 31 column 13
Here's my code :
Opportunity.Owner = Lead.Biz_Dev_Manager__c;
Here owner in opportunity is a lookup field and biz_dev_manager in lead is picklist(string) so it's throwing the above error where picklist(string) is not matching with user datatype. Can anyone tell me how to convert it and overcome this issue ?