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
Gemma BrewisGemma Brewis 

Can not update owner of Lead via Rest API

Hello salesforce support team
Could you please help to resolve issue listed below. 
I can not update OwnerId field at Lead table by Rest API.
I was tring to set up a new owner of lead by id of existed user, but salesforce change owner to the same.
Returned status code was ok.
I'd like to point that I can change lead owner by UI on salesforce web site.
Moreover I can change owner of account and opportunity by Rest API
Could you please clarify this wrong behavior.

Thank you
Best Answer chosen by Gemma Brewis
dougmcintyredougmcintyre
Hi Gemma,

I just tried to do a PATCH on OwnerId on Leads via the Workbench (https://workbench.developerforce.com/restExplorer.php) and I had no issues...

User-added image

Are there any type of Automation behind the Lead object (workflow, Field Update, Triggers, etc.) ?

Hope this helps,
Doug McIntyre



 

All Answers

dougmcintyredougmcintyre
Hi Gemma,

I just tried to do a PATCH on OwnerId on Leads via the Workbench (https://workbench.developerforce.com/restExplorer.php) and I had no issues...

User-added image

Are there any type of Automation behind the Lead object (workflow, Field Update, Triggers, etc.) ?

Hope this helps,
Doug McIntyre



 
This was selected as the best answer
Gemma BrewisGemma Brewis
Thank you, but via the Workbench same result.
Looks like there are some automation.
I am a new to salesforce development.
Could you please promt where workflow, Field Update, Triggers, etc. could be shown at salesforce. Thank you!!!!
 
dougmcintyredougmcintyre
You can find all these items under setup.  I would look at Validation Rules, Triggers, Workflow, Flow and Field Updates to start.


User-added image

Hope this helps!