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
daniel1110daniel1110 

85% code coverage, but fails to deploy

Hi,

 

I'm trying to convert use VWFConvertLead plugin. It has 85% pass rate, but I cannot successfully push this to production

 

Here's the error I'm receiving 

VWFConvertLead.basicTest()Class133 Failure Message: "System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []", Failure Stack Trace: "Class.VWFConvertLead.convertLead: line 133, column 1 Class.VWFConvertLead.invoke: line 22, column 1 Class.VWFConvertLead.basicTest: line 171, column 1"
VWFConvertLead.basicTestwithAccount()Class133 Failure Message: "System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []", Failure Stack Trace: "Class.VWFConvertLead.convertLead: line 133, column 1 Class.VWFConvertLead.invoke: line 22, column 1 Class.VWFConvertLead.basicTestwithAccount: line 205, ...
VWFConvertLead.basicTestwithAccounts()Class133 

Failure Message: "System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []", Failure Stack Trace: "Class.VWFConvertLead.convertLead: line 133, column 1 Class.VWFConvertLead.invoke: line 22, column 1 Class.VWFConvertLead.basicTestwithAccounts: line 241,...

 

The full code is at http://docs.database.com/dbcom/en-us/db_apex/apex_process_plugin_example_lead_convert.htm?version=182.0

 

Does anybody have any idea what I'm missing? Thank you in advance

Vinit_KumarVinit_Kumar

Hi Daniel,

 

Check the Converted check box for the lead status and assign that value to the Lead Status.

 

Setup-->Customize--->Lead--->Fields--->check for Lead Status field--->check for converted checkbox checked for what value--->assign that value to the lead status.

daniel1110daniel1110

Hi Vinit_Kumar,

 

I checked the lead status value I'm working with, which is 'Qualified'

 

I went to Leads Fields and found that value 'Qualifed' is checked under Converted.

 

How can I assign this value to Lead Status?

 

Daniel

Vinit_KumarVinit_Kumar

Daniel,

 

You should use convertedStatus in your code.Please go through the below link for the same:-

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_convertlead.htm