From: http://blog.ak-home.net/CategoryView,category,Dynamics%2BAx%2cProgrammierung%2cAPI.aspx
The book of purchase orders in AX is done with the class "PurchFormLetter" or one of its derived classes. Each booking type (e.g. Confirmation or Invoice) is represented by a class which is derived from the base class "PruchFormLetter".
To book an order, follow these steps:
1. Using the method "construct" of class "PurchFormLetter" to generate a object of specified booking type
2. Calling the "update" method to book the order
For examples: