• newbie@new
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Can anyone help me in integration
 I m new to it.. My requirements is that User will hit on Salesforce system from sap  to create user From sap to Salesforce 
We need to provide him Json and endpoint url. How to achieve this ?
Hi All 

I am facing a issue while converting a lead through Trigger 
my Requirement is lead should be automatically Converted whenever lead status is Qualified 
Below is the error i am getting :

Error i am getting




Code that i am using is 
trigger web2LeadConvert on Lead (After Update ) 
{
    Database.LeadConvert[] converts = new Database.LeadConvert[0];
    for(Lead record: Trigger.new) {
        if(record.Status == 'Qualified') 
        {
            Database.LeadConvert thisLead = new Database.LeadConvert();
            thisLead.setLeadId(record.Id);
            thisLead.setConvertedStatus('Qualified');
            converts.add(thisLead);
            System.debug('@@@ It has @@'+converts);
        }
    }
    System.debug ('@@Convertssss'+ converts.isEmpty());
    if(!converts.isEmpty()) {
        Database.convertLead(converts);
        System.debug('@@@converts'+converts);
    }
}
Please help me ... 
where am i doing the mistake ...