You need to sign in to do that
Don't have an account?

Your organization's code coverage is 4%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
Hi All,
I am not a developer at all and tried to deploy a small apex class from Sandbox to Production and hit this error below. Any help and/or guidance is highly appreciated

Thank You
I am not a developer at all and tried to deploy a small apex class from Sandbox to Production and hit this error below. Any help and/or guidance is highly appreciated
Thank You
All Answers
TestQuoteDetailstestQuoteDetailsSystem.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Financial_Year_End__c]: [Financial_Year_End__c]
Stack Trace: Class.TestQuoteDetails.testQuoteDetails: line 21, column 1
TestSuitetestRollupToMasterAccountSystem.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Financial_Year_End__c]: [Financial_Year_End__c]
Stack Trace: Class.TestSuite.testRollupToMasterAccount: line 13, column 1
TestSuitetestSetQuoteLineItemFieldsSystem.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Financial_Year_End__c]: [Financial_Year_End__c]
Stack Trace: Class.TestSuite.testSetQuoteLineItemFields: line 50, column 1
UtilitiestestSetQuoteLineItemFieldsSystem.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Financial_Year_End__c]: [Financial_Year_End__c]
Stack Trace: Class.Utilities.testSetQuoteLineItemFields: line 117, column 1
I wouldn't even know how to modify the code. Shall I paste the code here?
For the TestQuoteDetails see below:
@isTest
public class TestQuoteDetails {
static testMethod void testQuoteDetails() {
CustSettings__c custSettings = new CustSettings__c(Hardware_LTD_Maintenance_Product_Code__c='MTCE-H/W-PRE-001',
Hardware_Maintenance_Product_Code__c='MTCE-H/W-004',
Hardware_STD_Maintenance_Product_Code__c='MTCE-H/W-STD-001',
Software_LTD_Maintenance_Product_Code__c='MTCE-S/W-PRE-001',
Software_Maintenance_Product_Code__c='MTCE-S/W-005',
Software_STD_Maintenance_Product_Code__c='MTCE-S/W-STD-001'
);
insert custSettings;
Product2 p = new Product2(Name = 'Sample Product',ProductCode = 'SUPXXXXXXXXX',Family='Appliance',IsActive = true);
insert p;
PriceBookEntry pbe = new PriceBookEntry(Product2Id = p.Id,UnitPrice = 200,IsActive = true,Pricebook2Id = Test.getStandardPricebookId());
insert pbe;
Account a = new Account(Name='acc1');
insert a;
Opportunity op = new Opportunity(AccountId=a.Id, Name='opp1', CloseDate=System.today(), StageName='Prospect - (0CSFs)', Pricebook2Id=pbe.Pricebook2Id);
insert op;
OpportunityLineItem oli = new OpportunityLineItem(OpportunityId=op.Id,Quantity=1,PriceBookEntryId=pbe.Id,UnitPrice=200);
insert oli;
Quote q = new Quote(OpportunityId=op.Id,Name='quote1',PriceBook2Id=pbe.Pricebook2Id,Shipping_Terms__c='ship');
insert q;
QuoteLineItem qli = new QuoteLineItem(QuoteId=q.Id,Quantity=1,PriceBookEntryId=pbe.Id,UnitPrice=200);
insert qli;
QuoteDetails controller = new Quotedetails();
controller.relatedTo = q;
List<QuoteLineItem> qlis = controller.getQuoteLineItems;
}
}
Thanks