Sunday, May 25, 2014

Creating new Sales Pickinglist X++

On recent project, customer put up a requirement which was pretty unusual among common scenarios of sales picking. Customer wants a new sales pickinglist on cancellation of items on a single picking route. 
In order to achieve this functionality let have a look on the tables involved in maintaining data of sales pickinglist. 

  • WMSShipment 
  • WMSPickingRoute
  • WMSPickingRouteLink
  • WMSOrder
  • WMSOrderTrans

WMSShipment 

The WMSShipment table contains information about shipments.

WMSPickingRoute

The WMSPickingRoute table contains information about picking routes. The picking routes are used by the warehouse management system to control the picking process.


WMSPickingRouteLink

The WMSPickingRouteLink table contains information about which sales orders and which picking routes are related.


WMSOrder

The WMSOrder table contains information about orders that are handled by the warehouse management system.


WMSOrderTrans

The WMSOrderTrans table contains information about order lines and items that are handled by the warehouse management system. This table is used for item picking, shipping, and pallet transportation.

Saturday, May 24, 2014

Getting address by type X++

This post shows the code which helps in retrieving the address of Party (Customer, Vendor etc.) by providing the type of addresses.

Function which takes Party and LogisticsLocationRoleType (Invoice, Delivery, Shipping etc.)

public static LogisticsPostalAddress getPostalAddressByType(DirPartyRecId _party, LogisticsLocationRoleType _type)
{
    DirPartyLocation        partyLocation;
    DirPartyLocationRole    partyLocationRole;
    LogisticsLocation       location;
    LogisticsLocationRole   locationRole;
    LogisticsPostalAddress  postalAddress;

    select firstonly postalAddress
        exists join location
            where location.RecId == postalAddress.Location
        exists join locationRole
            where locationRole.Type  == _type
        exists join partyLocation
            where 
                partyLocation.Location == location.RecId &&
                partyLocation.Party == _party
        exists join partyLocationRole
            where partyLocationRole.PartyLocation == partyLocation.RecId &&
                partyLocationRole.LocationRole == locationRole.RecId;

    return postalAddress;
}

Sunday, May 18, 2014

Table event execution sequence in Dynamics AX

This post will provide information of sequence of event triggering while working on Table Browser and Data in Dynamics AX.

Field data change


Deleting record


Updating record


Saving record



When Table Browser opens


Pressing Ctr+N on Table Browser


Sunday, May 11, 2014

How Ship Carrier works in AX

Introduction

Microsoft Dynamics AX customers often use one or more shipping carriers to deliver their products to customers. Shipping software is available directly from these carriers, such as UPS and FedEx that can work with many carriers and centralize the shipping process. This software is used to calculate shipping rates, produce labels and tracking numbers, and generate additional reports and documents.
The shipping carrier interface feature allows Microsoft Dynamics AX customers to integrate with shipping software. The shipping software packages can pull information from Microsoft Dynamics AX, process packages, and then move their information into Microsoft Dynamics AX, eliminating manual entry and improving tracking visibility

Technical  Working

Step 1

The process begins with Packingslip functionality in AX. At this stage a request is generated by AX and saved in ShippCarreirShippingRequest table.

The following code inserts the request in ShipCarrierShippingRequest table.

Classes -> SalesPackingSlipJournalPost -> endPost -> line # 7