Bulk actions in the timesheet and time bill can be done through the n/action module.
action.executeBulk({}) the function can be used for the bulk execution following records to complete the specified actions in the list.
The supported actions and records are as follows.
| Record Type | Action ID | UI Button Label |
| Revenue Arrangement | allocate | Allocate |
| Time (TimeBill) | approve | Approve |
| Time (TimeBill) | reject | Reject |
| Time (TimeBill) | submit | Submit |
| Weekly Timesheet | approve | Approve All Pending |
| Weekly Timesheet | reject | Reject All Pending |
| Weekly Timesheet | submit | Submit |
| Bonus | cancel | Exclude from Payroll |
var approveRecords = action.executeBulk({
recordType: 'timebill',
id: 'approve',
params: [{ recordId: 1, note: 'note for 1' },
{ recordId: 5, note: 'note for 5' },
{ recordId: 23, note: 'note for 23' }]
})
});