Posts

Showing posts from January, 2020

Bulk Insertion from AOT query - Dynamics 365

I n Dynamics 365, we can use a static method to insert the record directly into the table, make sure that this method requires all the selection fields contains a non-null values otherwise this method will give you an error. Here is a quick review on how to achieve this without any loops. The query contains two data sources using inner join " InventTable " and " CustTable ". insert_recordset method requires three arguments. 1. Table buffer in which data needs to be inserted. 2. Map of fields and container for fields and values in that fields 3. Query from which data needs to be pulled. // method for inserting data into test table with insert recordset  private void insertDataintoTestTable()     {         Testtable table;         Query query                       = new Query ( queryStr ( TestQuery ));         QueryBuildDataSource ...