Skip to Content
0
Oct 11, 2019 at 09:44 PM

Deleting records from Database using ODataModel Remove function

634 Views

Hi,

My back-end table has 2 primary keys and it expects me to pass both the values to remove/delete records from the database.

ODataModel.remove() method doesn't have any PayLoad or filters parameters. The URL parameter which is available I guess cannot be used to pass values, it is for $expand, $top, etc. So what's the way out here....

//Neither this works
oDataMdl.remove("/<EntitySet>?$filter=Key1 eq 'Value_1'"
//Nor this works
oDataMdl.remove("/<EntitySet>('Value_1')"

On top of this I need to pass two values and just one. Any suggestion please ?