How to confirm, pick sales order, update, pack and generate invoice of a sales order in Dynamics AX 2012 R2 through X++ code?
<p>I am using the below code for the confirmation of a sales order and then picking it.
For confirming</p>

<pre><code>public void confirmSO()
{
    salesTable = SalesTable::find(salesTable.SalesId);
    salesFormletter = SalesFormletter::construct(DocumentStatus::PickingSlip);
    salesFormletter.update(salesTable, systemDateGet(), SalesUpdate::All, AccountOrder::None,
    false, false);
}
</code></pre>

<p>and for picking</p>

<p>public void pickSlip()</p>

<pre><code>{
    salesTable = salesTable::find(salesTable.SalesId);
    salesFormLetter = SalesFormLetter_PickingList::newPickingList();
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.update(salesTable,
                            systemdateget(),
                            SalesUpdate::All,
                            AccountOrder::None,
                            NoYes::No,
                            NoYes::No);
}
</code></pre>

<p>now how to pack it? and convert its status to "Delivered" and how to generate invoice for it and change its status to "Invoiced"?</p>