• Final test
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
Here the link https://developer.intuit.com/app/developer/appdetail/test/keys?appId=djQuMTo6OGQzYmJlYTI3Yg:28b7be2d-c664-4ac0-ad2c-562815330815
in which i created connected app as a third party, i am not getting how can i get Authorization code for access token?
Please give me answer if anyone have code solution related to DTO in rest api then please share me.
Thank you.
Hi guys, I have been trying to write a trigger to convert lead if someone changes its status to closed converted the code is:
trigger convertlead on Lead ( after update ,after insert) {

list<lead> mylead= trigger.new;
for(lead l : mylead)
{
    if(l.status=='Closed - Converted')
    {
      
   
        Database.LeadConvert lc = new Database.LeadConvert();
    
    lc.setConvertedStatus('Closed - Converted');
    lc.setLeadId(l.id);



Database.LeadConvertResult lcr = Database.convertLead(lc);
System.debug(lcr.isSuccess());
  } 
}
}
its giving follwoing error:
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger WkAbhi.convertlead caused an unexpected exception, contact your administrator: WkAbhi.convertlead: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, System.DmlException: Update failed. First exception on row 0 with id 00Q28000001ovz7EAA; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, WkAbhi.convertlead: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: CANNOT_UPDATE_CONVERTED_LEAD, cannot reference converted lead: [] Trigger.WkAbhi.convertlead: line 17, column 1: [] (System Code) : []: Trigger.WkAbhi.convertlead: line 17, column 1


Please help....