You need to sign in to do that
Don't have an account?
Runi
Test class Aura
Hi team,
How to write test class below calss.
public class InquiryConvertController {
@AuraEnabled
public static String getLeadId(String inquiryId){
Inquiry__c leadId=[select id,Inquiry_Lead__c from Inquiry__c where id=:inquiryId];
return leadId.Inquiry_Lead__c;
}
@AuraEnabled
public static Id populateOpp(String leadId,String inquiryId) {
if(leadId !=null){
Database.update(new Lead(id=leadId,Inquiry__c=inquiryId));
}
return leadId;
}
}
How to write test class below calss.
public class InquiryConvertController {
@AuraEnabled
public static String getLeadId(String inquiryId){
Inquiry__c leadId=[select id,Inquiry_Lead__c from Inquiry__c where id=:inquiryId];
return leadId.Inquiry_Lead__c;
}
@AuraEnabled
public static Id populateOpp(String leadId,String inquiryId) {
if(leadId !=null){
Database.update(new Lead(id=leadId,Inquiry__c=inquiryId));
}
return leadId;
}
}
Try
If this information helps, please mark the answer as best. Thank you
All Answers
Can you clarify the relationship between Inquiry__c and the Lead object (which is the child object and which is the parent object)?
Thanks
Lead is Parent and Inquiry__c ic child object.
Thanks
Swathi
Try
If this information helps, please mark the answer as best. Thank you