Shipment module picking list in Axapta 2009

Hi,

Can someone help me with this problem please?

We have a custom written intercompany shipment module in our system which was implemented some years ago. This worked fine in Axapta 4.0

Since moving to Axapta 5.0 (2009), clicking the picking list class button in the module freezes the entire system. I cannot figure out what is going on and I can’t debug either.

The main change from AX 4.0 to 5.0 is changing the use of InventPickingListLink table to wmspickingroute and wmspickingroutelink. Please see the code change below - the original code from 4.0 is commented out at the bottom.

void createLink()

{

USIOBShipmentLink USIOBShipmentLink;

wmsPickingRouteLink wmsPickingRouteLink;

wmsPickingRoute wmsPickingRouteLocal;

;

//if (!USIOBShipmentLink::find(USIShipmentId, this.parmId()))

while select wmsPickingRouteLocal index hint parmidx

where wmsPickingRouteLocal.parmId == this.parmId()

{

while select wmsPickingRouteLink index PickingRouteIdx

where wmsPickingRouteLink.PickingRouteId == wmsPickingRouteLocal.pickingRouteID

{

//select firstonly USIOBShipmentLink.

ttsbegin;

USIOBShipmentLink.clear();

USIOBShipmentLink.USIOBShipmentId = USIShipmentId;

USIOBShipmentLink.SalesId = wmsPickingRouteLink.InventTransRefId;

USIOBShipmentLink.DocumentStatus = this.documentStatus();

USIOBShipmentLink.PickingListId = wmsPickingRouteLink.PickingRouteId;

USIOBShipmentLink.ParmId = this.parmId();

USIOBShipmentLink.ShipmentUpdType = this.parmShipmentVia(); //08.01.2006

USIOBShipmentLink.insert();

ttscommit;

}

}

/*USIOBShipmentLink USIOBShipmentLink;

InventPickingListLink CustPickingListSalesLink;

;

//if (!USIOBShipmentLink::find(USIShipmentId, this.parmId()))

while select CustPickingListSalesLink index hint parmidx

where CustPickingListSalesLink.parmId == this.parmId()

{

ttsbegin;

USIOBShipmentLink.clear();

USIOBShipmentLink.USIOBShipmentId = USIShipmentId;

USIOBShipmentLink.SalesId = CustPickingListSalesLink.OrderId;

USIOBShipmentLink.DocumentStatus = this.documentStatus();

USIOBShipmentLink.PickingListId = CustPickingListSalesLink.pickingListId;

USIOBShipmentLink.ParmId = this.parmId();

USIOBShipmentLink.ShipmentUpdType = this.parmShipmentVia(); //08.01.2006

USIOBShipmentLink.insert();

ttscommit;

}*/

}

Thanks a lot for helping me out.

Uma