Best approach to create sales orders by X++

I want to create a sales order by using X++ in dynamics 365 Operations

what will be the best approach?

  • Use AXSalesTable and AXSalesLine classes
  • Use Direct Table Buffers
  • Use SalesOrderHeaderEntity & SalesOrderLineEntity

Don’t want to use SalesOrderEntity

Please check this axaptadepot.blogspot.ae/…/create-new-sales-order-in-ax-through.html

Thanx Parshnat, can you tell why Data Entity are not good for sales order creations?

Look at the standard objects that already has the code to create sales order.
Example - SalesAutoCreate* calsses.
I have never seen standard code using AXsalesTable and AxsalesLine classes to created sales orders, except inter company scenario