3

My Requirement: For existing/New Lead when Auto_disqualify__c field is checked, then I should disqualify this Lead in 5 business days if its not acted in meantime i.e. disqualify it if status is Open on 5th day.

Process Builder Sol: In criteria I tried to check for Auto_disqualify__c = True and then in immediate Action I am assigning Today() value in date field (Dt_Start_Auto_Disq__c). In Scheduled Action, set time for Action to Execute, I am giving 0 days after 5_Business_days__c (a formula field that considered Sat and Sun on Dt_Start_Auto_Disq__c field). On the Scheduled Action, update record I am just changing Status = Disqualified after performing Status check if its Open.

The issue is process building does all the above but during the 5 days when Lead is converted to Contact then I get below error:

Error: Unable to convert lead that is in use by workflow

Is there any workaround or other fix besides Apex?

  • Did you try time based workflows? – Raul Mar 29 '17 at 14:30
  • @RahulSharma, No I didn't try WF, I assume that it will also throw similar issues. – Mahesh Raghuraman Mar 29 '17 at 14:39
  • It should not ideally – Raul Mar 29 '17 at 14:40
  • @RahulSharma, I received the same error when I used WF: Error: Unable to convert lead that is in use by workflow – Mahesh Raghuraman Mar 29 '17 at 16:49
1

As stated in this Help article, this is expected behavior if:

there is a time-based workflow action pending that is related to the Lead.

This can be tracked down by going to Setup | Monitoring | Time-Based Workflow. Then filter on criteria related to the Lead record that caused the error to see which workflow is implicated.

You will need to clear the Auto_disqualify__c checkbox and save the record before attempting to convert, which will remove the record from the Time-Based Workflow queue. This can either be done by user training (perhaps facilitated by a Quick Action), or a Visualforce page that overrides the Convert button and does the same.

| improve this answer | |
  • appreciate your input but we want to implement without customization (VFP). Also if users forget to uncheck the Auto_disqualify__c checkbox then it just throws unfriendly error. Also is there a way to check 5 business days that includes company holidays and weekend? I know we can create Company holidays but not sure how to use the same in formula field or in process builder. – Mahesh Raghuraman Apr 5 '17 at 15:07
0

After researching I found that only using apex code we can achieve it. More info: If the lead record is in the time based action queue then we cannot convert to a lead. Per documentation its nature of the process builder time dependent action. Again the workaround is Auto_disqualify__c to unflag by user before converting which is manual step. So thru declarative I couldn't achieve it.

| improve this answer | |
  • This isn't really an answer. What did you do, exactly? – Adrian Larson Apr 11 '17 at 22:25
  • @AdrianLarson, if the lead record is in the time based action queue then we cannot convert to a lead. Per documentation its nature of the process builder time dependent action. Again the workaround is Auto_disqualify__c to unflag by user before converting which is manual step. So thru declarative I couldn't achieve it. – Mahesh Raghuraman May 10 '17 at 17:06
  • 1
    Please edit your post to clarify, rather than responding via comments. – Adrian Larson May 10 '17 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.