X++ code to post the Invoice and Packing slip for AX2012

How can write the X++ code to post the invoice and packing slip in AX2012…

We have as method as of 2009 on SalesFormLetter, which help job done…

SalesFormletter.update(SalesTable,systemDateGet(),SalesUpdate::All,AccountOrder::None,false,false);