
This is the error (happens only in production):
System.QueryException: List has no rows for assignment to SObject
Stack Trace: Class.TestLoader_GE_Status_Update_AfterInsert.myUnitTestCancelled: line 44, column 1System.QueryException: List has no rows for assignment to SObjectStack Trace: Class.TestLoader_GE_Status_Update_AfterInsert.myUnitTestDealerShipped: line 100, column 1
Can someone give me insight as to why there is a difference between Sandbox and production.Thanks!2 risposte
Does data in production and sandboxes work differently? Ans : No. Production and Sandboxes works in same manner. I think you might missed some configuration checks which updates Opportunity by the trigger on "Loader_GE_Status_Update__c". Opportunity opp = [Select VisitStatus__c From Opportunity Where VisitNumber__c in :visitNumbers LIMIT 1]; Just to make a note always assign SOQL result to a list not to a Sobject. Write debug logs in trigger and check the flow once again in production.If possible can you share the code.Email : naveenila@gmail.com