You need to sign in to do that
Don't have an account?
Geo No
Roll Up summary field fom products to opportunity
Hello,
I'm just an admin, not a dev (yet). I would like to create a roll up field at the opportunity taht will be the summ of the product meeting a certain criteria. When I create a rollup summary field at the opportunity level, I can filter the criterias, but not the one I am interested in: Product Name.
How can I filter the product name in this field?
Many thanks!
I'm just an admin, not a dev (yet). I would like to create a roll up field at the opportunity taht will be the summ of the product meeting a certain criteria. When I create a rollup summary field at the opportunity level, I can filter the criterias, but not the one I am interested in: Product Name.
How can I filter the product name in this field?
Many thanks!
PriceBookEntry.Product2.Name). After, you will need to do a mass update on all existing Opportunity Products to get this field populated. (note, if you are in an org that changes the names of existing products, this will cause some disconnect between the new name and existing related opportunity products).
So steps:
1) Create new text field on opportunity product (Product_Name__c)
2) Create workflow on opportunity product
every time record is updated or created
criteria
Product_Name__c <> PriceBookEntry.Product2.Name
Perform field update Product_Name__c to formula PriceBookEntry.Product2.Name
3) You can do a mass update in dataloader, or run this in command console till 0 rows are updated.
list<OpportunityLineItem> ol = new list<OpportunityLineItem>();
for(OpportunityLineItem o: [Select Product_Name__c, PriceBookEntry.Product2.Name from OpportunityLineItem where Product_Name__c != PriceBookEntry.Product2.Name LIMIT 100]){
o.Product_Name__c = o.PriceBookEntry.Product2.Name;
ol.add(o);
}
update ol;