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(className, id, permanent)
or
DSApi.delete(className, id, permanent, auditMsg)
Parameters
className: the str name of the table
id: the record number as str
permanent: permanent or temporary. a boolean
auditMsg: any message as str
Sample Code
className = "shared.common.product"
permanent = True
id = "12"
res = DSApi.delete(className, id, permanent)
Returns
A Result object indicating the success or failure of the deletion operation.
deleteMany
Delete many records at a time. The list is provided which represents the record numbers.
DSApi.deleteMany(className, ids, boolean permanent)
or
DSApi.deleteMany(String className, Iterable<String> ids, boolean permanent, String auditMsg)
Parameters
className: the str name of the table
ids: list of the regards
permanent: either flagged or permanent. a boolean
auditMsg: any message as str
Sample Code
className = "shared.common.product"
permanent = True
ids = ["12", "13"]
res = DSApi.deleteMany(className, ids, permanent)
Returns
A Result object indicating the success or failure of the deletion operation.
deleteByQuery
Delete a record (s) by executing a query.
DSApi.deleteByQuery (className, query, permanent)
or
DSApi.deleteByQuery(className, query, permanent, auditMsg)
Parameters
className: str name of the table
query: query as str
permanent: flagged or permanent as boolean
Sample Code
className = "shared.common.product"
permanent = True
query = "Select first_name from product_tbl where price>100"
res = DSApi.deleteByQuery(className, query, permanent)
Returns
A Result object indicating the success or failure of the deletion operation.
Last updated