API Get
You can use this function to enable the API integration with the application.
Purpose
This function is used to retrieve the data by sending a request to the server.
.
Syntax
FsSrvAppResponse response = APIGet(string symbol, string ObjectKey)
Arguments
Part | Type | Description |
---|---|---|
symbol |
String |
The type of object. Use empty quotation marks to indicate the symbol of the current object for the workflow, or the new object for the copy method. |
objectkey | String |
The object key for which context attributes can be added. Use empty quotation marks to indicate the current object for the workflow or the new object for the copy method. |
Example
When a workflow is started in an action set, this scripting function is executed.
Steps
- Create a new Action “APIGET_ITEMDESCR” and specify this script:
Option Strict Off Imports System Imports System.Diagnostics Imports Formation.Shared.Defs Class ActionScript Inherits FcProcFuncSetEventWF Function wf_start() As Long Dim data As FsSrvAppResponse = APIGet(_OBJECTSYMBOL, _OBJECTKEY) Dim row As DataRow = data.reponseDataSet.Tables("FSITEM").Rows(0) MessageList("The Description is:" & row.item("DESCRIPTION")) End Function End Class
- Navigate to
- Create a new Action Set
- Assign the Action “APIGET_ITEMDESCR” in the Steps grid
- Assign a User Code and the description in the row
- Navigate to Security tab and assign the desired User/Role/Group
- Assign “ITEM” as the Target Data symbol and save the Action Set
- Navigate to , open any object
- Click on and launch the “APIGET_ITEMDESCR” workflow