Activity Forums Salesforce® Discussions can we create roll-up summary on formula field in salesforce?

  • Manpreet

    Member
    April 4, 2017 at 6:53 am

    Hi Saurabh,

    Can Roll-up summary field works with Formula field? The answer is Yes and No.

    Yes if the Formula field is not referring to a field from foreign object. Let me give you an example:

    Project (Parent object)

    Project Name (Text 50)
    Due Date (Date)
    Total Cost (Roll-up Summary : Sum of all child Project Items Calculated Cost)

    scrn-1

    Project Item (Child Object)

    Project Item Name (Text 50)
    Item Quantity (Number 18, 0)
    Item Price (Currency 16, 2)
    Calculated Cost (Formula = Item Quantity * Item Price)

    scrn-2

     

    No if the Formula field is referring to another field in a different object. Let me use the same example:

    Project (Parent object) (Same as above)
    Project Item (Child Object)

    Project Item Name (Text 50)
    Item Quantity (Number 18, 0)
    Related Item (Lookup : Product)
    Calculated Cost (Formula = Item Quantity * Product.Price)
    Note that the Calculated Cost is now referring to a field called Price in the Product object. Because of this reason, the Roll-up Summary field (Total Cost) in the Project Object will not work anymore.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos