What time is it?!? Game time hoooo!!
Ok so I was being facetious, it’s not game time, it’s time to add our roll-up summary fields to our custom application (You are probably thinking to yourself that might be the worst intro to a Blog post ever...and I’m inclined to agree).
We will be adding three specific fields. These three fields will calculate their values based on data in the child object. To design a roll- up summary field you need to create a new field and choose “Roll-Up Summary” as the field type. Below you will find a screen shot this particular page looks like:
To complete the process the following data will need to be inputted:
Field Type: Roll-Up Summary
Field Label: Amount Paid
Field Name: Amount_Paid
Summarized Object: Scheduled Payments
Roll-Up Type: SUM
Field to Aggregate: Amount Due
The final step involved in creating the roll-up summary fields is to determine filter criteria. This step is only necessary if you want to recapitulate your scheduled payments into three separate fields (which is what we are doing). These fields are ‘Amount Paid’, ‘Amount Pending’, and ‘Amount Past Due’. We start this by opening the “Filter Criteria” section and selecting “Only records meeting certain criteria should be included in the calculation” and lastly adding “Status equals Paid”. To avoid typos for these particular picklists, we use the lookup button next to the value field to select the correct picklist value we want to filter by. Finally we hit ‘Next’ and proceed through the rest of the field wizard as we have previously done.
Input the following data to create our other two fields:
Field Type: Roll-Up Summary
Field Label: Amount Past Due
Field Name: Amount_Past_Due
Summarized Object: Scheduled Payments
Roll-Up Type: SUM
Field to Aggregate: Amount Due
Filter Criteria: Status equals Past Due
Field Type: Roll-Up Summary
Field Label: Amount Pending
Field Name: Amount_Pending
Summarized Object: Scheduled Payments
Roll-Up Type: SUM
Field to Aggregate: Amount Due
Filter Criteria: Status equals Pending
Now that these fields are complete our objects are ready for some validation rules. This will be demonstrated in the next post because it really is game time now. The San Francisco Giants have two games to win in Philadelphia this weekend so I will be very distracted. To all my readers that are fans of the Phillies I’m sorry…but not that sorry.
I thought it was an excellent intro! :)
ReplyDelete