@mbanq/core-sdk-js / commands / UpdateEntryInDataTable
Function: UpdateEntryInDataTable()
UpdateEntryInDataTable(
params,data):Command<{data: {fileData?:Blob|File;tableData:Record<string,any>; };params: {apptableid:number;datatable:string;datatableId:number; }; }, {changes?: {id:number; };clientId?:number;id:number;loanId?:number;officeId?:number;resourceId:number;savingsId?:number; }>
Defined in: src/commands/rest/dataTable.ts:224
Update an entry in a data table
Use this API to update an entry in the data table. You must provide the unique identifier of the entry you wish to update.
Behavior: A successful response indicates that the entry has been successfully updated in the data table.
Parameters
params
The path parameters
apptableid
number = ...
The ID of the application table (defaults to 101 for client tables)
datatable
string = ...
The name of the data table where the entry will be updated
datatableId
number = ...
The unique identifier of the data table entry to update
data
The request body
fileData?
Blob | File = ...
Optional file to upload (PDF, JPEG, JPG, PNG formats supported)
tableData
Record<string, any> = ...
JSON object containing data table fields details to update
Returns
Command<{ data: { fileData?: Blob | File; tableData: Record<string, any>; }; params: { apptableid: number; datatable: string; datatableId: number; }; }, { changes?: { id: number; }; clientId?: number; id: number; loanId?: number; officeId?: number; resourceId: number; savingsId?: number; }>
Command object that executes the API request and returns the updated entry details
Example
const command = UpdateEntryInDataTable(
{ datatable: 'd_testdatatable', apptableid: 101, datatableId: 1651719413544 },
{
tableData: {
"id": "1651719413544",
"locale": "en",
"dateFormat": "dd MMMM yyyy"
}
}
);
const result = await client.request(command);
console.log(result.id); // 1719455311113
console.log(result.resourceId); // 1105