JDBC Driver for Acumatica

Build 24.0.9060

ExecuteAction

Perform an action on an Acumatica ERP form.

Executing an Action

To execute an Acumatica Action, you will need to specify the action that you are going to execute via the 'ActionName' input parameter, the entity type via the TopLevelEntity input parameter, the EntityRecord and optionally the Action parameters via the Parameters input, if you are executing a custom Action.

To specify the entity record, you may either submit the single record in JSON format, or you may create a temporary table containing group of recrods and then reference the temporary table in the EntityRecord input parameter.

Note: The custom parameters can only be submitted in the JSON format as in the example below.

EXEC ExecuteAction ActionName = 'Close', TopLevelEntity = 'Case', EntityRecord = '{"id": "e3f46a39-1a14-e911-816f-bc920a5e0ac8"}',
    Parameters = '{
        "custom": {
            "FilterPreview": {
                "Reason": {
                    "type" : "CustomStringField", 
                    "value" : "Abandoned"
                }
            }
        }
    }'

Executing an Action submitting the record in the JSON format

To submit a record in the JSON format, you will need set the EntityRecord input parameter to the JSON object containing the record on which the action is going to be executed.

For example, via the below statement you can confirm the shipment for the shipment with number 003523.

EXEC ExecuteAction ActionName = 'ConfirmShipment', TopLevelEntity = 'Shipment',
      EntityRecord = '{
      "Type": {
        "value": "Shipment"
      },
      "ShipmentNbr": {
        "value": "003523"
      }
    }'

You should note, that only one entity record can be specified in the EntityRecord input parameter when using the JSON format.

Executing an Action submitting a Temporary Table of recrods

If using a temporary table, it must be defined and inserted within the same connection. Closing the connection will clear out any temporary tables in memory.

Start by inserting the related entities corresponding to the same entity type into a temporary table.

The following statements add three Shipment records into the Shipment#TEMP temporary table.

INSERT INTO Shipment#TEMP (Type, ShipmentNbr) VALUES ('Shipment', '003523')
INSERT INTO Shipment#TEMP (Type, ShipmentNbr) VALUES ('Shipment', '003524')
INSERT INTO Shipment#TEMP (Type, ShipmentNbr) VALUES ('Shipment', '003525')

Lastly, reference the temporary table via the EntityRecord input parameter, just as in the below example.

EXEC ExecuteAction ActionName = 'ConfirmShipment', TopLevelEntity = 'Shipment', EntityRecord = 'Shipment#TEMP'

If more than one entity record is provided, the driver will automatically split the records and execute the Action for each of them.

Input

Name Type Description
TopLevelEntity String The name of the entity type for which you are going to perform an action.
ActionName String The name of the action that you are going to execute.
EntityRecord String The entity record in the JSON format or the temporary table of entity records to which the action should be applied.
Parameters String The parameters of the action in the JSON format.

Result Set Columns

Name Type Description
Status String Specific message text describing the status or any errors or warning for the execute action.
AffectedRecords String The number of affected records.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060