• VIPUL GALWADE
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All,
I'm getting the following error while inserting quote in a test class :
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, List has no rows for assignment to SObject: []
Please find the test class appended herewith :
@istest(SeeAllData=true)  private class TestSubmitforQuoteApproval {             static testmethod void test() {        Test.startTest();                   //Account acc = [select Id from Account limit 1];                   Opportunity oppr = new Opportunity();           //oppr.AccountId = acc.ID;           oppr.Annual_Contract_Value_ACV__c = 111;           oppr.BU__c = 'MJ';           oppr.CloseDate = Date.today();           oppr.Contract_Opportunity_Estimate_CoE__c = 111;           oppr.Total_Contract_Value_TCV__c = 111;            oppr.Name = 'SubmitforQuoteApproval';            oppr.StageName = 'Prospecting';             oppr.Date_on_Opportunity_Prospecting_Stage__c = Date.today();             //oppr.UpdatedForReminderToApprover__c = Date.today();           insert oppr;                      Quote quot = new Quote ();           quot.Name = 'TestPropForSandbox2016-1';            //quot.Status ='Draft';           quot.OpportunityId = oppr.id ;           insert quot;
}
}

Any help towards resolving this issue will be much appreciated

Thanks & Rgards,

Debendra Ray