Overview

Another variant of apiAction, this action allows you to call a ClearProcess API based on a file uploaded by the user. Valid page components for this action are:

  • ActionButton

Properties

PropertyDescription
actionSet this to “apiFromFile” to use this action.
apiThe name of the ClearProcess API to be called.
dynamicParametersValues from the page that should be passed.
parametersStatic values that should be passed regardless of the content on the page.
successActionsAn array of actions to be called if the API returns no error messages.
errorActionsAn array of actions to be called if the API returns error messages.

Example

Add the following to your component:

"onClick": {
  "action": "apiFromFile",
  "api": "GetAttachments",
  "dynamicParameters": {
    "CUSTOMER": [
      "payload",
      "GetCustomer",
      "HEADER",
      "KUNNR"
    ]
  },
  "parameters": {
    "TYPE": "KNA1"
  },
  "successActions": [
    {
      "action": "hideModal",
      "name": "searchCustomers"
    }
  ],
  "errorActions": [
    {
      "action": "showModal",
      "name": "errorMessages"
    }
  ]
}