The bulk update action is designed for the use case where employees leave balance is maintained externally and the balance details need to be synced into NetSuite for reporting purposes. The bulk update allows multiple employees to be submitted in the same request, and it performs no business or record level script resulting in less overhead and improved performance over syncEmployee. The bulk update is currently only supported on the employee record for the update of leave balances.
Field In JSON Request Object | Map To NetSuite Employee Field |
---|---|
annualbalance | custentity_pr_annual_leave_accrued |
annualavailable | custentity_pr_annual_leave_available |
personalbalance | custentity_pr_personal_leave_accrued |
personalavailable | custentity_pr_personal_leave_available |
longservicebalance | custentity_pr_lsl_accrued |
longserviceavailable | custentity_pr_lsl_available |
alternatebalance | custentity_pr_alt_leave_balance |
inlieubalance | custentity_pr_time_in_lieu_accrued |
An example request and response is listed below, containing updates for two employees. One or more fields must be specified but it is not mandatory to submit all.
Request | Response |
---|---|
Bulk Update Request {"action":"function", "function":"bulkupdate", "recordtype":"employee", "data":[ {"id": "15857", "inlieubalance" : 15,"alternatebalance": 25}, {"id": "15856", "annualbalance" : 12} ]} | Bulk Update Response {"success":true, "data":[ {"success":true,"id":"15857"}, {"success":true,"id":"15856"} ],"processms":"6745"} |