delete
Delete a record from the table. It can be made permanent or temporary. A delete flag is updated when it is handled as temporary.
DSApi.delete(String className, String id, boolean permanent)
or
DSApi.delete(String className, String id, boolean permanent, String auditMsg)
Parameters
className: the name of the table
id: the record number
permanent: permanent or temporary
auditMsg: any message
Sample Code
String className = "shared.common.product";
boolean permanent = true;
String id = "12";
Object res = DSApi.delete(className, id, permanent);
Returns
deleteMany
Delete many records at a time. The list is provided which represents the record numbers.
DSApi.deleteMany(String className, Iterable<String> ids, boolean permanent)
or
DSApi.deleteMany(String className, Iterable<String> ids, boolean permanent, String auditMsg)
Parameters
className: the name of the table
ids: list of the regards
permanent: either flagged or permanent
auditMsg: any message
Sample Code
String className = "shared.common.product";
boolean permanent = true;
Iterable<String> ids = Arrays.asList(new String[]{"12", "13"});
Object res = DSApi.deleteMany(className, ids, permanent);
Returns
deleteByQuery
Delete a record (s) by executing a query.
DSApi.deleteByQuery(String className, String query, boolean permanent)
or
DSApi.deleteByQuery(String className, String query, boolean permanent, String auditMsg)
Parameters
className: name of the table
query: query
permanent: flagged or permanent
Sample Code
String className = "shared.common.product";
boolean permanent = true;
String query = "Select first_name from product_tbl where price>100";
Object res = DSApi.deleteByQuery(className, query, permanent);
Returns
Last updated