LeadConvertResult Class
The result of a lead conversion.
An array of LeadConvertResult objects is returned with the convertLead Database method. Each element in the LeadConvertResult array corresponds to the sObject array passed as the SObject[] parameter in the convertLead Database method, that is, the first element in the LeadConvertResult array matches the first element passed in the SObject array, the second element corresponds to the second element, and so on. If only one sObject is passed in, the LeadConvertResult array contains a single element.
The following are methods for LeadConvertResult. All are instance methods.
-
The ID of the new account (if a new account was specified) or the ID of the account specified when
convertLeadwas invoked. -
The ID of the new contact (if a new contact was specified) or the ID of the contact specified when
convertLeadwas invoked. -
If an error occurred, an array of one or more database error objects providing the error code and description.
-
The ID of the converted lead.
-
The ID of the new opportunity, if one was created when
convertLeadwas invoked. -
The ID of the new or existing person account specified when
convertLeadwas invoked. -
A Boolean value that is set to
trueif the DML operation was successful for this object,falseotherwise
The ID of the new account (if a new account was specified) or the ID of the account specified when convertLead was invoked.
public ID getAccountId()
Type: ID
The ID of the new contact (if a new contact was specified) or the ID of the contact specified when convertLead was invoked.
public ID getContactId()
Type: ID
If an error occurred, an array of one or more database error objects providing the error code and description.
public Database.Error[] getErrors()
Type: Database.Error[]
The ID of the converted lead.
public ID getLeadId()
Type: ID
The ID of the new opportunity, if one was created when convertLead was invoked.
public ID getOpportunityId()
Type: ID
The ID of the new or existing person account specified when convertLead was invoked.
public ID getRelatedPersonAccountId()
Type: ID
A Boolean value that is set to true if the DML operation was successful for this object, false otherwise
public Boolean isSuccess()
Type: Boolean