Content Standard GuideTitlePSA: Timecards Hours Are Not Rolling Up to Milestone or AssignmentURL NamePSA-Timecards-Hours-Are-Not-Rolling-Up-to-Milestone-or-AssignmentInformationProduct AreaHelp Product AreaProject ManagementRelease VersionHelp Release VersionSymptomsHelp SymptomsBillable Hours In Financials and Non-Billable Hours in Financials fields are not updated on MilestoneThere are Timecards that have Include in Financials set to "true" that are billable and non-billableError in Apex Jobs: "pse:Too many query rows: 50001"EnvironmentHelp EnvironmentProfessional Services AutomationAll VersionsResolutionHelp ResolutionApply one of the options below: If the PS Enterprise package is on version Spring 2020 or higher, set the Action: Refresh Expense Roll-Ups field and Action: Refresh Timecard Roll-Ups field to "true" on the Assignment and/or Milestone record. After saving, the Action: Refresh Expense Roll-Ups and Action: Refresh Timecard Roll-Ups fields are automatically set to "false" again Give the Affected User Field Level access through a Permission Set or ProfileSubmit a dummy Timecard to the same Project, Milestone or Assignment, and the hours will re-adjust to the correct amount Making sure the Include in Financial field is set to "true" on the dummy Timecard to affect the Billable Hours In Financial fieldMaking sure the Submitted field is set to "true" on the dummy Timecard to affect the Billable Hours Submitted field Uncheck and recheck Include in Financials on one of the existing Timecards to cause Timecard Rollup to recalculate again Follow the steps below if the Timecard has not been billed: Go to the Timecard record that contains that Milestone and/or AssignmentSelect Admin Edit buttonSet the Include in Financials field to "false"Select SaveSelect Admin Edit buttonSet the Include in Financials field to "true"Select Save Follow the steps below if the Timecard has been billed: Go to the Timecard record that contains that Milestone and/or AssignmentSelect Admin Edit buttonSet the Billed field to "false"Set the Invoiced field to "false"Select SaveSelect Admin Edit buttonSet the Include in Financials field to "false"Select SaveSelect Admin Edit buttonSet the Include in Financials field to "true"Set the Billed field to "true"Set the Invoiced field to "true" Moving forward, make sure there are not thousands of Timecards logged on the Milestone. If there are, split the large Milestones up (i.e. one for each year) and open and close them for time entry accordinglySet the Timecard-Queue-Batch-Size Configuration Option to "1" in the Timecard Configuration Group. Setting the value to N will limit the system to N Milestones before passing on to next chained queueable job. By making N = "1" on the Configuration Option, the system will only look at one Milestone at a time to process timecards. The only way the errors will come up in Apex jobs is if a single milestone is so big (so many timecards) that by itself it exceeds governor limits. (NOTE: This value will need to be increased again after Timecard hours have been resolved. Leaving it at "1" can cause a high number of TimecardExpenseRollupQueueable jobs and Apex limits to be exceeded.)Vote on the IdeaCauseHelp CauseEven Milestones with a few Timecards can have incorrect hours because when a user enters time in the Time Entry UI, they could be entering time for several projects with different Milestones. When they click on the Submit button, it submits all the Timecards together. If one of the Timecards happen to have a Milestone with many Timecards logged against it, the roll up most likely won't occur on any of the Milestones in that batch. There may be a "pse:Too many query rows: 50001" or "Apex heap size" error on the TimecardManager class found in Apex JobsThe error is happening in Apex Jobs because when a Timecard is Submitted/Approved. The system has to go to all the Milestones for the Timecards Submitted/Approved and query on each to add up all of the Timecard Splits for those Milestones. As a result, Milestones with over 10,000 timecards logged against it will have thousands more of Timecard Splits which has a high possibility of hitting governor limitsThis happens due to transient issuesThe User does not have Field Level accessAdditional NotesHelp Additional NotesThis process does not affects Project record's actual fields onlyThis process does not affect Assignments or Milestone record. To correct those records apply The transient issue will continue to happen randomly. As a suggestion, the internal Salesforce System Administrator can create custom workflow for active Milestone and Assignment to set the Action: Refresh Expense Roll-Ups and Action: Refresh Timecard Roll-Ups fields to true and save action to trigger the update when that one record is updated. If assistance is needed on this customization the FF Consulting Services team can assist through a paid engagementThe roll up issue can also be fixed for any of the following fields: Billable Hours Submitted Billable Days Submitted Billable Hours In Financials Billable Days In Financials Billable Amount In Financials Non-Billable Hours Submitted Non-Billable Hours In Financials
Was this article helpful?30Choose a general reason-- Choose a general reason --FeedbackUpload FilesUpload FilesOr drop filesSubmit