web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Post an Sales invoice in D365 Finance & Operations X++

Rahul Kiran Profile Picture Rahul Kiran 481
Below is the job I created for posting sales invoices.

class Test_PostPackingSlip
{       
    /// <summary>
    /// Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {
        SalesTable _SalesTable;
        SalesFormLetter_Invoice invoice;
            ttsbegin;
            _SalesTable.clear();
            _SalesTable = SalesTable::find("SO00125116");
            invoice = SalesFormLetter::construct(DocumentStatus::Invoice);
            // Post the invoice
            invoice.update(_SalesTable,
            SystemDateGet(),
            SalesUpdate::All,
            AccountOrder::None,
            false,
            true); // Set to true to print the invoice
              ttsCommit;
    }

}

This was originally posted here.

Comments

*This post is locked for comments