• sweetleon
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Howdy,

My client wants to replace the Opportunities related list on the Account detail screen with 2 lists for different Opportunity types, and they want those lists to behave like regular related lists with buttons at the top and a link to see all the Opportunities (of that type) for the Account if there are more than can be shown in the related list.

Is there an easy/standard way to do this without completely re-implementing related lists myself?

Thanks in advance,

Lenny
I'm getting a "Too many query rows" error on a SOQL For Loop.  It was my understanding that you could use this approach to prevent governor limits from occurring.
 
This is line 106 in the test method:
Code:
insert oAssignments;

 
This is line 40 within the trigger:
Code:
for (OpportunityLineItem oOpportunityLineItem : [SELECT Id, OpportunityId, Project__c, PricebookEntry.Product2Id, PricebookEntry.ProductCode, PricebookEntry.Name FROM OpportunityLineItem WHERE Project__c IN :oProjectsMap.KeySet()])

 
 
Code:
System.Exception: Too many query rows: 501

Trigger.AssignmentInsertPopulateProductFlagsHandler: line 40, column 57

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AssignmentInsertPopulateProductFlagsHandler: execution of BeforeInsert

caused by: System.Exception: Too many query rows: 501

Trigger.AssignmentInsertPopulateProductFlagsHandler: line 40, column 57

Class.TestAssignmentInsertPopulateProductFlags.testAssignmentInsertPopulateProductFlagsHandler: line 106, column 9

 


Message Edited by kpeterson on 02-19-2008 06:38 AM