ebs.updateEbs (Deprecated)
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.
Updates attribute values for a specific record. You can update multiple attributes of the same record in the same request.
Syntax
Copy
ebs.updateEbs(modifyRequest: IModifyRequestCollection, callback: any, errorCallback: any): void
Where IModifyRequestCollection has the following syntax
Copy
{
Id: "record_id",
EntityName: "parent_entity",
Values: [
{
Attribute: "attribute_name",
Value: "attribute_value"
},
...
{
Attribute: "attribute_name",
Value: "attribute_value"
}
]
}<![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. |
Response
| 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. |
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.
- The response indicates that the record was updated successfully (IsSuccess: true).
Request
Copy
ebs.updateEbs({
Id: "91d0dc16-1dc7-4c58-b82e-e8751e756f5d",
EntityName: "customers",
Values: [
{
Attribute: "surname",
Value: "Rockefeller"
},
{
Attribute: "idCardSeries",
Value: "478765782011"
}
]},
function(e){
console.log(e.IsSuccess); // boolean - true
console.log(e.Message); // Record inserted
console.log(e.Id); // id of modified record
}
);
Response
Copy
{
Id: "91d0dc16-1dc7-4c58-b82e-e8751e756f5d",
Message: "Record updated",
IsSuccess: true,
ErrorCode: 0
}