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
The_London_ScottThe_London_Scott 

Timestamping fails on lead conversion

I've set up a workflow rule and field update to set a custom Date/Time field

 

Lead_Processed_Time__c to

 

NOW()

 

when Lead.Status = several statuses expected to be "terminal," that is, the last status a user sets.

 

This works well except in the case where it matters the most: on lead conversion.

 

Lead statuses set on the lead-conversion screen fail to trigger the workflow rule. I've reproduced this with three different approaches to the workflow rule:

 

1. Lead Status = [the terminal statuses]

2. Lead Status = [the terminal statuses] OR IsConverted = TRUE

3. Lead Status <> [the non-terminal statuses]

 

So I assume that the problem is that the workflow fires after lead conversion, or, to put it another way, that by the time the workflow rule should fire, the field update fails because the lead has been converted and is now read-only.

 

Thoughts on how to overcome this bit of tedium without having to write a beforeUpdate trigger?

 

Scott in London

Best Answer chosen by Admin (Salesforce Developers) 
Ashish_SFDCAshish_SFDC

Hi Scott, 

 

You are right once the Lead is Converted it means that The Lead does notr exist anymore and cannot update the value in the Read Only Hidden Lead. 

 

Instead you can go for a Before Update Trigger (Apex) which can update the Field before Converting. 

 

Regards,
Ashish

All Answers

Ashish_SFDCAshish_SFDC

Hi Scott, 

 

You are right once the Lead is Converted it means that The Lead does notr exist anymore and cannot update the value in the Read Only Hidden Lead. 

 

Instead you can go for a Before Update Trigger (Apex) which can update the Field before Converting. 

 

Regards,
Ashish

This was selected as the best answer
The_London_ScottThe_London_Scott

Thanks for the quick update!

digamber.prasaddigamber.prasad

Hi,

 

I am afraid that you have to take trigger route for this.