You need to sign in to do that
Don't have an account?
jamesclark clark
How to change the owner of the record
Hi all,
I want to change the owner of the record when a field value is equal to the value of the another field in another object.
example:In lead object, custom field value is equal to the value of my custom object field then i want to change the owner of the lead as my custom object assigned user.
Can anyone help me over here.
Regards,
james
I want to change the owner of the record when a field value is equal to the value of the another field in another object.
example:In lead object, custom field value is equal to the value of my custom object field then i want to change the owner of the lead as my custom object assigned user.
Can anyone help me over here.
Regards,
james
Unfortunately, you can't auto-populate a Lookup field via a Formula or a Workflow Rule with a Field Update. But you can at least create a Validation Formula that will throw an error if the 2 fields are not the same.
OwnerId <> Custom_Lookup_Field
You can write trigger, like before update
I think its has lookup relation.
Query the lead field which you need to compare
when the field gets mapped to your value in lead we need to get the custom object username and update the lead.
please let me know if you need code.
Thanks
Regards,
Jyo
What is the relation between lead and custom object? You can either use Apex trigger or Flow with Process Builder (Declarative).
R
Can you please post the code it will to know how to write the code for these kind of scenarios.
Thanks in advance.
Regards,
Bhargav.