답변 1개
To resolve the issue, update the Lead record with the correct value for the "Status" field before attempting to insert it. For example:
Lead newLeadRec = CreateLead('John' + System.now().Format('hms'), 'Doe' + System.now().Format('hms'), '', 'Comity1 Designs');
newLeadRec.Country = 'United States';newLeadRec.State = 'GA';newLeadRec.LeadSource = 'Partner';newLeadRec.Lead_Source_Most_Recent_Picklist__c = 'Test Value';newLeadRec.Status = '1-New';insert newLeadRec;