• Chris Dugal 4
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
List<OpportunityLineItem> oLIList = new List<OpportunityLineItem>();
oLIList = [SELECT Id, Product2Id, OpportunityId
                     FROM OpportunityLineItem
                    WHERE OpportunityId IN :oIdSet];
Map<Id, Map<Id, OpportunityLineItem>> oLIMap = new Map<Id, Map<Id, OpportunityLineItem>>();
        for(OpportunityLineItem oLI : oLIList){

I am querying for OpportunityLineItems and I need to put them in a map nested in a map were the inner map key is the product2Id and the outer map key is the opportunityId. But I cannot figure how to do this in the for loop. Also, the value of the inner map should be the OpportunityLineItem record. Thank you for your help.
List<OpportunityLineItem> oLIList = new List<OpportunityLineItem>();
oLIList = [SELECT Id, Product2Id, OpportunityId
                     FROM OpportunityLineItem
                    WHERE OpportunityId IN :oIdSet];
Map<Id, Map<Id, OpportunityLineItem>> oLIMap = new Map<Id, Map<Id, OpportunityLineItem>>();
        for(OpportunityLineItem oLI : oLIList){

I am querying for OpportunityLineItems and I need to put them in a map nested in a map were the inner map key is the product2Id and the outer map key is the opportunityId. But I cannot figure how to do this in the for loop. Also, the value of the inner map should be the OpportunityLineItem record. Thank you for your help.
Hi all,

This is my scenario : 
I use all standard objects to do my opportunity (opportunity, opportunity line items, quotes, products ...)
When I create an opportunity, I select my product by click on "Add product" button. When I choose my pricebook I click on "next" and select my products" and after "Select". I arrive in the "Add products" page to enter my sales price.
Here is my problem : I just want to know if it's possible to create a visualforce page or another things to replace this page and display some fields in term of the product type ?

Really thanks in advance
Cheers
Thomas