Guest User

Untitled

a guest
Dec 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Method does not exist or incorrect signature: void put(OpportunityLineItem) from the type Map<Id,OpportunityLineItem>
  2.  
  3. Map<Id,OpportunityLineItem> mapOli = new Map<Id,OpportunityLineItem> ();
  4. for(OpportunityLineItemSchedule sch: lstLineItemSchedule) {
  5. If(mapOli .get(sch.OpportunityLineItemId) == null) {
  6. Decimal oliUniPrice = oliIDToSalesPriceMap.get(sch.OpportunityLineItemId);
  7. mapOli .put(new OpportunityLineItem(Id=sch.Id,UnitPrice =oliUniPrice));
  8. }
  9. }
  10.  
  11. mapOli.put(new OpportunityLineItem(Id=oLisch.Id,UnitPrice =oliUniPrice));
  12.  
  13. mapOli.put(<key- whatever you choose>, new OpportunityLineItem(Id=oLisch.Id,UnitPrice =oliUniPrice));
Add Comment
Please, Sign In to add comment