Inventory Count Record Actions
The inventory count transaction type supports the following actions: startcount, completecount, reject, and approve.
For help working with this record in the UI, see Inventory Count.
For information about SuiteScript 2.0 record actions, see the following topics:
startcount
Corresponding UI Button |
Start Count |
Action Description |
Changes the status of Open inventory counts to Started. |
Returns |
Object that contains the inventory count ID |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
20 units |
Since |
2024.2 |
Parameters
See action.execute(options) for details about parameters required for the execution of any action. The allocate action does not support any additional parameters.
completecount
Corresponding UI Button |
Complete Count |
Action Description |
Changes the status of counts from Started to Completed/Pending approval. |
Returns |
Object that contains the inventory count ID |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
5 units |
Since |
2024.2 |
Parameters
See action.execute(options) for details about parameters required for the execution of any action. The allocate action does not support any additional parameters.
approve
Corresponding UI Button |
Approve |
Action Description |
Changes the status of completed counts to Approved. Creates inventory adjustments if the count results do not match the current on-hand quantities. |
Returns |
Object that contains the inventory count ID |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
60 units |
Since |
2024.2 |
Parameters
See action.execute(options) for details about parameters required for the execution of any action. The allocate action does not support any additional parameters.
reject
Corresponding UI Button |
Reject |
Action Description |
Reassigns the Open status to completed counts. |
Returns |
Object that contains the inventory count ID |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
5 units |
Since |
2024.2 |
Parameters
See action.execute(options) for details about parameters required for the execution of any action. The allocate action does not support any additional parameters.
Sample Code
Refer to the following samples for using the start count action from the client side and server side:
require(['N/action'], function(actionMod) {
// client side example
actionMod.getActions.promise({recordType: 'inventorycount'}).then(function(actions) {
var startAction = actions.startcount;
startAction.promise({recordId: 1}).then(function(result) {
console.log("Inventory Count with id " + result.response.id + " has been started");
});
});
// server side example
var result = actionMod.executeAction({id: 'startcount', recordType: 'inventorycount', params: {recordId: 1}});
});