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?

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

2 Answers 2

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.

1
  • 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. Commented Apr 5, 2017 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.

3
  • This isn't really an answer. What did you do, exactly?
    – Adrian Larson
    Commented Apr 11, 2017 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. Commented May 10, 2017 at 17:06
  • 1
    Please edit your post to clarify, rather than responding via comments.
    – Adrian Larson
    Commented May 10, 2017 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .