D365F&O - X++ - delete_from in X++ AX2012 and D365 F&O

 delete_from is used to Delete all records from a table at once based on some condition.

//declare your table varibale
CustTable  custTable;

 

ttsbegin;

// Delete all records without any condition
delete_from custTable;


//delete records based on some condition
delete_from custTable
 where custTable.AccountNum == "Cust12345677";

Comments

Popular posts from this blog

D365F&O - X++ - Set contract parameter value in controller class of SysOperationServiceBase framework

D365F&O - X++ - Create Batch job using SysOperationServiceBase in X++

D365F&O - X++ - Create and post Customer payment Journal using X++ code.