function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
benhbenh 

Summating custom fields

I'm a total newbie to Salesforce.  My company is using the Scribe Sales Order plugin/ app and I have to create a field that is derived from the total price of all Sales Order Items (i.e. a sales order total).

Sales Order is one object, Sales Order Item is another, which has Sales Order as it's master.

I expected it to be a customer formula in Sales Order like this; {!LineItemAmount__c:SUM}
but this won't even validate.

{!LineItemAmount__c} validates OK - it is in the custom fields drop down but it comes out as 0  when it's applied, even though there are Sales Order Items, each with total prices, so I'm guess it is not the right one to use anyway.

The Sales Order Item has a custom field available for the amount I'm after, referenced like this
{!TotalPrice__c}

What I need to do is add up the {!TotalPrice__c} for all Sales Order Items in a particular Sales Order.  Does that make sense - if so, can I do it?

Thanks in advance

Ben