You need to sign in to do that
Don't have an account?
Steve Berley
Test Class: How to force a lead conversion error?
I have a method that includes conversion of a lead. The database.convertlead() call is wrapped in a try/catch.
How do I force an error in my test code so I can exercise the catch part?
Thanks,
Steve
try { Database.LeadConvertResult lcr = Database.convertLead(lc); } catch (exception e) { lpTools.logError('Client_Hub_Attachment_Tools.convertPortalProspects', e); }
How do I force an error in my test code so I can exercise the catch part?
Thanks,
Steve
Replace the above code block with the below code block