RequestFormevent
Revision as of 15:02, 16 December 2021 by Tvi (talk | contribs) (Created page with "This Codeunit is not ready for use! == What it does == == How to invoke == == Configuration == {| class="wikitable" !Datapoint ! !Type !Notes |- |when |Required |String |Possible values: "after-update" or "before-update". Determines whether the call is executed before or after an item is updated. |- |status |Optional |Array |An array of the StatusID's where the call should be executed. If "after-update", then this is if the item is in one of these status's after the u...")
This Codeunit is not ready for use!
What it does
How to invoke
Configuration
Datapoint | Type | Notes | |
---|---|---|---|
when | Required | String | Possible values: "after-update" or "before-update".
Determines whether the call is executed before or after an item is updated. |
status | Optional | Array | An array of the StatusID's where the call should be executed.
If "after-update", then this is if the item is in one of these status's after the update, likewise for "before-update". If not given, then the call is executed every time. |
call | Required | The actual configuration of the call. | |
call.url | Required | String | The url that is to be called. This supports input of parameters from the item. |
call.method | Optional | String | The HTTP-method of the call, one of: "POST", "GET", "PUT" or "DELETE". Default: "GET". |
call.type | Optional | String | The datatype of data returned, supported types: "json" or "XML". Default: "json". |
call.headers | Optional | Map | A map of extra headers that should be set |
call.params | Optional | Map | Path parameters that should be set and send. |
call.body | Optional | String | A string that will be set and send. Not available for "GET". |
call.update | Optional | Map | Fields that should be updated based on the data returned. |
Sample
[
{
"when": "before-update",
"status": [69],
"call": {
"url": "https://acme.com/resource/[ID]",
"method": "GET",
"type": "json",
"headers": {
"Authorization": "Bearer XYZ"
},
"params": {
"param": "[DATA]"
},
"body": "",
"update": {
"[INFO]": "[info]"
}
}
}
]
Developer info
- Type: CodeunitFormevent
- Security: Requires session