ebs.updateAsync (Deprecated)
(FintechOS Studio 20.2 and later)
IMPORTANT!
This function has been deprecated starting with v24.1. To re-enable it, use the the sys-do-not-allow-client-side-direct-data-updates system parameter.
This function has been deprecated starting with v24.1. To re-enable it, use the the sys-do-not-allow-client-side-direct-data-updates system parameter.
Asynchronously updates attribute values for a specific record. You can update multiple attributes of the same record in the same call. The result of the operation is returned in a promise object.
Syntax
Copy
ebs.updateAsync(modifyRequest: IModifyRequestCollection): Promise<any>
Where IModifyRequestCollection has the following syntax
Copy
{
Id: "<<i>record_id</i>>",
EntityName: "<<i>parent_entity</i>>",
Values: [
{
Attribute: "<<i>attribute_name</i>>",
Value: "<<i>attribute_value</i>>"
},
...
{
Attribute: "<<i>attribute_name</i>>",
Value: "<<i>attribute_value</i>>"
}
]
}<![CDATA[
]]>
| Parameter | Description |
|---|---|
record_id
|
Unique identifier of the record you wish to update. |
parent_entity
|
Name of the parent entity of the record you wish to update. |
attribute_name
|
Name of the record's attribute you wish to update. |
attribute_value
|
The value you wish to allocate the record's attribute. |
Result
The promise result is a JSON object containing key-value pairs detailing the update operation, such as the ones listed below:
| Key | Description |
|---|---|
Id
|
Unique identifier of he record you updated. |
Message
|
Indicates the outcome of the record update. |
IsSuccess
|
Indicates if the record update was successful. |
Copy
{
"Id": "71ff8535-4aca-48d9-9f95-5b9c0366617d",
"Message": "Record updated",
"IsSuccess": true,
"ClientScript": null,
"ErrorCode": 0,
"Serialized": "{\"Id\":\"71ff8535-4aca-48d9-9f95-5b9c0366617d\",\"Message\":\"Record updated\",\"IsSuccess\":true,\"ClientScript\":null,\"ErrorCode\":0,\"Serialized\":null,\"UIResult\":null,\"AdditionalInfo\":{\"dynamicDefinitionFileTimestamps\":{\"formulaBuiltinFunctions\":\"D82FBF028DAF2407DCC7260CA2BD97547FD18465\",\"formulaArguments\":\"B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0\",\"formulaCoefficients\":\"B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0\",\"formulaSteps\":\"B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0\",\"importedLibraries\":\"DEC83931C8203B7BADA73F3B13EEA3799CA5C5B5\",\"workflowParameters\":\"CDF5A6F8C40D93DAFA63C9676475D625F8E80E48\",\"webApiClientLibraryHeaders\":\"20E61D1496E587A0009ADADE9C84693D814A5F88\",\"nativeLibraries\":\"888EC2F0316C702C006E1F345C30F50065C8C785\",\"webApiClientLibrary\":\"9676CDF38BB6C1F9D717C8DA7AAE2D047EEFD12A\",\"workflowDelegateManager\":\"622B755023A9733853D7C3DD4A15044310848E63\",\"workflowFluentQueryGlobal\":\"C657BF199C56BD61358A20FA03A83E485ED927B0\",\"workflowFluentQueryEntity\":\"7F7605F7F2BE743B01B8D0DDA8270D8BDBDA6658\",\"workflowClientCertificates\":\"3AE488FB4CDC7CDE3C5F88FBF1B736E4FB2B5AAA\",\"workflowTransientData\":\"3AE488FB4CDC7CDE3C5F88FBF1B736E4FB2B5AAA\"}}}",
"UIResult": null,
"AdditionalInfo": {
"dynamicDefinitionFileTimestamps": {
"formulaBuiltinFunctions": "D82FBF028DAF2407DCC7260CA2BD97547FD18465",
"formulaArguments": "B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0",
"formulaCoefficients": "B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0",
"formulaSteps": "B20C128701FEABDA3B06FF0D5DADCC57ACF9E2A0",
"importedLibraries": "DEC83931C8203B7BADA73F3B13EEA3799CA5C5B5",
"workflowParameters": "CDF5A6F8C40D93DAFA63C9676475D625F8E80E48",
"webApiClientLibraryHeaders": "20E61D1496E587A0009ADADE9C84693D814A5F88",
"nativeLibraries": "888EC2F0316C702C006E1F345C30F50065C8C785",
"webApiClientLibrary": "9676CDF38BB6C1F9D717C8DA7AAE2D047EEFD12A",
"workflowDelegateManager": "622B755023A9733853D7C3DD4A15044310848E63",
"workflowFluentQueryGlobal": "C657BF199C56BD61358A20FA03A83E485ED927B0",
"workflowFluentQueryEntity": "7F7605F7F2BE743B01B8D0DDA8270D8BDBDA6658",
"workflowClientCertificates": "3AE488FB4CDC7CDE3C5F88FBF1B736E4FB2B5AAA",
"workflowTransientData": "3AE488FB4CDC7CDE3C5F88FBF1B736E4FB2B5AAA"
}
}
}
Examples
In this example:
- A customer changes her surname and is issued new identity papers with a new series (idCardSeries).
- The record that identifies the customer has the 91d0dc16-1dc7-4c58-b82e-e8751e756f5d ID.
- The entity that stores the customers' personal data is called customers.
- The customer's new surname is Rockefeller and the new identity card series is 478765782011.
- If the update is successful (IsSuccess: true), we log the Update Successful message in the browser console. Otherwise, we log the Update Failed message.
Copy
ebs.updateAsync({
Id: "91d0dc16-1dc7-4c58-b82e-e8751e756f5d",
EntityName: "customers",
Values: [
{Attribute: "surname", Value: "Rockefeller"},
{Attribute: "idCardSeries", Value: "478765782011"}
]
})
.then(function(result) {
if (result.IsSuccess == true)
console.log('Update Successful')
else
console.log('Update Failed')
})