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
kevinvw2000kevinvw2000 

RECORD_IN_USE_BY_WORKFLOW when converting a lead using APEX

We are controlling the lead convert process using APEX and Visualforce.  Everything seems to work correctly and the leads are converting, but once in a while we get an Apex error of - 

RECORD_IN_USE_BY_WORKFLOW

 

I can't seem to track down the conflict.  Any suggestions on how to troubleshoot this in a production environment?  Shutting off workflow to troubleshoot is probably not an option.

 

Thanks,

 

Kevin.


AmitSahuAmitSahu

Hi Kevin,

 

Are you using any workflow on Lead which is time dependant?

May be you need to look into that.