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
Naveen Gupta 27Naveen Gupta 27 

Updating a converted lead

We have a lead that has been converted to opportunity. We want to merge opportunity stage, back in the lead status field.

We are able to view the converted lead, and manually update the converted lead (salesforce settings allow this).

Now we're trying to update the lead "automatically" using the "process builder". The process builder needs to look at any updates to the opportunity-> stage field and based on that, update the corresponding lead (lead->status field). We have the lead ID stored in the opportunity for the lookup.

Somehow the process builder is not able to find the "converted lead", hence the update is failing.

In case this is not possible using "process builder", should we implement this use case using "apex code development"? appreicate any pointers you may have.
 
Karthik PKarthik P
Hi Naveen,

I have tried this out in my developer org and it works. I created a lookup field on the Opportunity object to lookup to the Lead ( which is the source of conversion). And I store the lead id on the Opportunity during the conversion using Process Builder process. I use a separate process on Opportunity to update the Lead Status field when the Opportunity Stage changes. I just gave a standard picklist value to update it ( Working - Contacted ). I even tried with the standard user who didn't have permission to see the converted Lead record. But, they can still update the Lead record via the Process Builder process.

So, in short, yes we can use Process Builder to update the Lead record based on the action from Opportunity edit. I would suggest few things here:
  1. Check if the Opportunity record has the Lead ID populated when the Process Builder process runs. You can see the id when you enable the debug logs with the Workflow filter set to Fine or Finer. 
  2. Also, check if the user who is changing the Opportunity has read access to Lead object. Try to login as that user using the Login feature on the User record and see the visibility of the Lead record. 
  3. And if it helps, you can enable the "Set Audit Fields upon Record Creation" permission to the User who is changing the Opportunity.
Hope it helps. Sorry, couldn't pin-point the resolution for the issue you are facing.

Thanks,
Karthik

 
Karthik PKarthik P
Hi Naveen,

I request that if the answer which I posted works for you, please select it as the best answer so that others who have similar issue can benefit from the same. If not, please post further information on the issue you are facing so that others can help you. 

Thanks,
Karthik