You need to sign in to do that
Don't have an account?
![rajesh k 10 rajesh k 10](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
how to get PricebookEntry listprice of each productids in salesforce using map?
Hi,
map<Id,list<PricebookEntry>> ProductidToPricebookEntry = new map<Id,list<PricebookEntry>>();
set<ID> productids=new set<ID>();
for(In_Product__c ip:InProductList)
{
productids.add(ip.Product__c);
if(ProductidToPricebookEntry.containsKey(ip.Product__c))
{
ProductidToPricebookEntry.get(ip.Product__c);
}
}
map<Id,list<PricebookEntry>> ProductidToPricebookEntry = new map<Id,list<PricebookEntry>>();
set<ID> productids=new set<ID>();
for(In_Product__c ip:InProductList)
{
productids.add(ip.Product__c);
if(ProductidToPricebookEntry.containsKey(ip.Product__c))
{
ProductidToPricebookEntry.get(ip.Product__c);
}
}
Try below code to prepare the map
Regards,
Bhanu Mahesh