@mbanq/core-sdk-js / commands / CreateDataTableProductMapping
Function: CreateDataTableProductMapping()
CreateDataTableProductMapping(
data):Command<{data: {datatableName:string;entity:string;productId:number; }; }, {id:number;resourceId:number; }>
Defined in: src/commands/rest/dataTable.ts:413
Create entity data table product mapping
This API is used to establish a mapping between an entity table, a data table, and a product. Once the backoffice user selects the desired entity table, data table, and product, this API is called to create and store the mapping configuration, allowing the system to link specific product data with the relevant entity and data tables for future operations.
Parameters
data
The request body
datatableName
string = ...
The name of the data table to be associated with the entity (e.g., 'd_loan_additional_details')
entity
string = ...
The name of the application table associated with the entity (e.g., 'm_loan')
productId
number = ...
The ID of the product to be mapped with the entity and data table
Returns
Command<{ data: { datatableName: string; entity: string; productId: number; }; }, { id: number; resourceId: number; }>
Command object that executes the API request and returns the created mapping details
Example
const mapping = await client.request(CreateDataTableProductMapping({
entity: 'm_loan',
productId: 23,
datatableName: 'd_loan_additional_details'
}));
console.log('Mapping created with ID:', mapping.id);
console.log('Resource ID:', mapping.resourceId);