User currently must use a separate Excel file to calculate the weight of Opportunities.
Objective:
Have the Total Weight calculated automatically in the Opportunity header.
What’s done so far:
Products have a Gross Weight fields (field name: Gross_weight_per_unit__c, date type: number).
A formula in the Opportunity Product object called “Weight_KG__c” will multiply the Gross Weight from Products with the Quantity.
Weight_KG__c (Formula): Quantity * PricebookEntry.Product2.Gross_weight_per_unit__c
The “Weight_KG__c” formula appear in the Opportunity Product’s Related List, which is displayed on the Opportunity’s layout. Yay! :) (see screenshot bellow)
Problem encountered:
From the Opportunity object, I have tried to create a Roll-Up Summary for the “Weight_KG__c” field. Different fields are available to select from the drop-down menu “Field to Aggregate”, but “Weight_KG__c” is not one of them. I'm uncertain of why it's not available.
What parameters should I check to make this field available to be selected?
Or, what other options would be available to create an automatic sum of this data field?
Thanks!
P.S.: I'm adding here some screenshots, I hope it can help in illustrating what I'm experiencing:
In the Product object, the Gross Weight field (Gross_weight_per_unit__c)
In the Opportunity Product object, the Weight (KG) field (Weight_KG__c) formula.
The Weight (KG) field (Weight_KG__c) formula works in the Opportunity layout, it's pretty neat!
The last step would be to create an automatic SUM of all "Weight (KG)". This sum shoud appear in the Opportunity header, next to "Close Date".
The "Weight (KG)" formula (Weight_KG__c) is not listed in the Field to Aggregate drop-down menu.
4 answers
Eric Praud (Activ8 Solar Energies) Forum Ambassador
Hi,
You cannot use a cross-object formula in roll ups.
Have a look at this for a workaround:
https://focusonforce.com/configuration/salesforce-roll-up-summary-using-the-value-of-a-formula-field/#:~:text=Salesforce%20Roll%2Dup%20Summary%20Using%20the%20Value%20of%20a%20Formula,the%20cost%20of%20a%20product.