Invoice Record Actions
markforgrouping
Corresponding UI Button |
Mark for Grouping |
Action Description |
Indicates whether an invoice is available for grouping, but does not add this invoice to a group. The Invoice Groups feature must be enabled to use this action. For more information about the Invoice Groups feature, see Invoice Groups Overview. |
Returns |
{notifications:[], response:{}} |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
None |
Since |
2020.2 |
The internal ID for this action is markforgrouping.
The Mark for Grouping action appears on the Invoice record type.
For help working with the invoice record in the UI, see Invoices.
Supported Functions
The invoice record is partially scriptable. It can be created, updated, deleted, and searched using SuiteScript. It cannot be copied or transformed.
Possible Error Messages
The Mark for Grouping action generates the following error messages:
-
The user does not have permission or the invoice is restricted.
-
This invoice is already marked.
-
The invoice is partially or fully paid.
-
There is no sales order associated with this invoice.
Parameters
-
recordid for invoice group
-
invoice list
Code Sample
require(['N/action'], function(actionMod) {
var result = actionMod.execute({id: 'markforgrouping', recordType: 'invoice', params: {recordId: 1}});
...
// Add addtional code
removeinvoicefromgroup
Corresponding UI Button |
Remove From Group |
Action Description |
Removes an invoice from an existing invoice group. The Invoice Groups feature must be enabled to use this action. For more information about the Invoice Groups feature, see Invoice Groups Overview. |
Returns |
{notifications:[], response:{}} |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
None |
Since |
2020.2 |
The internal ID for this action is removeinvoicefromgroup.
The Remove From Group action appears on the Invoice record type.
For help working with the invoice record in the UI, see Invoices.
Supported Functions
The invoice record is partially scriptable. It can be created, updated, deleted, and searched using SuiteScript. It cannot be copied or transformed.
Possible Error Messages
The Remove From Group action generates the following error messages:
-
The user does not have permission or the invoice is restricted.
-
The operation was completed concurrently.
-
The invoice is partially or fully paid.
-
This invoice is the only invoice in the invoice group..
Parameters
-
recordid for invoice group
Code Sample
require(['N/action'], function(actionMod) {
var result = actionMod.execute({id: 'removeinvoicefromgroup', recordType: 'invoice', params: {recordId: 1}});
...
// Add additional code
unmarkforgrouping
Corresponding UI Button |
Unmark for Grouping |
Action Description |
Indicates an invoice ineligible for grouping, but it does not remove the invoice from the group. The Invoice Groups feature must be enabled to use this action. For more information about the Invoice Groups feature, see Invoice Groups Overview. |
Returns |
{notifications:[], response:{}} |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
None |
Since |
2020.2 |
The internal ID for this action is unmarkforgrouping.
For help working with the invoice record in the UI, see Invoices.
Supported Functions
The invoice record is partially scriptable. It can be created, updated, deleted, and searched using SuiteScript. It cannot be copied or transformed.
Possible Error Messages
-
The user does not have permission or the invoice is restricted.
-
This invoice is already grouped.
-
This is already a standalone invoice.
Parameters
-
record id for invoice
Code Sample
require(['N/action'], function(actionMod) {
var result = actionMod.execute({id: 'unmarkforgrouping', recordType: 'invoice', params: {recordId: 1});
...
// Add additional code