Wednesday, February 29, 2012

Ax2012: View map for addresses


Hi Friends,

Just came across feature in AX2012, ability to view maps for a address.
e.g: On customer master form you will notice a new button “map” under the fast tab of addresses.




When you click this system will open the map in explorer using bing!!! Cool isn’t it J




How it is done: Check the code below. This is also an example of CLR Interop. You can find the standard code using .net function to encode URL.



This feature is also available in AX2009 as shown below:


Tuesday, February 28, 2012

AX2012 : X++ code to update picking list for sales order

Hi Friends,

Use the following code to generate the picking list for a sales order. This will give you the same results when you do Sales Order --> Pick and Pack --> Generate picking list.


static void SalesOrder_UpdatePickingList(Args _args)
{
    SalesFormLetter_PickingList salesFormLetter;
    SalesTable      salesTable = salesTable::find('SO-101292');

    ;
    salesFormLetter = SalesFormLetter_PickingList::newPickingList();
    salesFormLetter.transDate(systemDateGet());
    salesFormLetter.update(salesTable,
                            systemdateget(),
                            SalesUpdate::All,
                            AccountOrder::None,
                            NoYes::No,
                            NoYes::No);
}