You can use trigger simialar to thos. Here I am assing one of the user in sasss profile as owner.
trigger ChangeOwner on Opportunity (before insert) {
User us=[select id,name,ProfileId from User where Profile.name='sasss' limit 1];
for(Opportunity opp:Trigger.new){
opp.ownerid=us.id;
}
}
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Can you confirm if you need Trigger logic or Flow?
Thanks,
You can use trigger simialar to thos. Here I am assing one of the user in sasss profile as owner.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
I have one more query Like ===>>
Is it Possible to use share Objects to change Owners of the Record??