Discussion:
Listing Purchase Orders in x++
(too old to reply)
obewankenobe
2008-11-14 17:58:15 UTC
Permalink
Hi,

I need a way to list all open PO's via X++. Looking at the Stock Management
Tab, I have the arrival overview form which lists everything that is expected
to be coming in. I want a way to get that data via x~++.

I have tried querying the following tables:
WMSArrivalOverviewTmp
WMSArrivalDetailTmp

However both are empty.

I then attempted to examing the PurchTable:
PurchTable::vendOpenOrders("");

I would have hoped this would show all open PO's, but only lists 4, all of
which are closed.

I would like to list the PO's and their associated items via x++.

Can someone please point me in the right direction?

Thanks in advance.
unknown
2008-11-14 20:53:01 UTC
Permalink
If you look at the way WMSArrivalOverview form is implemented, you will be
able to get the same code:

WMSArrivalOverviewGeneration wmsArrivalOverviewGeneration =
WMSArrivalOverviewGeneration::construct();
;

wmsArrivalOverviewGeneration.parmWmsArrivalOverviewTmp(_wmsArrivalOverviewTmp);

wmsArrivalOverviewGeneration.parmWmsArrivalDetailTmp(_wmsArrivalDetailTmp);

wmsArrivalOverviewGeneration.parmWmsArrivalOverviewOptions(WMSArrivalOverviewOptions::newFromPacked(_packedOptions));
return wmsArrivalOverviewGeneration.fillTables();

The main method is fillTables()
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by obewankenobe
Hi,
I need a way to list all open PO's via X++. Looking at the Stock Management
Tab, I have the arrival overview form which lists everything that is expected
to be coming in. I want a way to get that data via x~++.
WMSArrivalOverviewTmp
WMSArrivalDetailTmp
However both are empty.
PurchTable::vendOpenOrders("");
I would have hoped this would show all open PO's, but only lists 4, all of
which are closed.
I would like to list the PO's and their associated items via x++.
Can someone please point me in the right direction?
Thanks in advance.
obewankenobe
2008-11-17 13:01:00 UTC
Permalink
Thanks for the help. But when I try to use that class and method, I get the
following error:

The method is declared protected and may only be called from methods in
classes derived from WMSArrivalOverviewGeneration.

What am I doing wrong?

Thanks
Post by unknown
If you look at the way WMSArrivalOverview form is implemented, you will be
WMSArrivalOverviewGeneration wmsArrivalOverviewGeneration =
WMSArrivalOverviewGeneration::construct();
;
wmsArrivalOverviewGeneration.parmWmsArrivalOverviewTmp(_wmsArrivalOverviewTmp);
wmsArrivalOverviewGeneration.parmWmsArrivalDetailTmp(_wmsArrivalDetailTmp);
wmsArrivalOverviewGeneration.parmWmsArrivalOverviewOptions(WMSArrivalOverviewOptions::newFromPacked(_packedOptions));
return wmsArrivalOverviewGeneration.fillTables();
The main method is fillTables()
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by obewankenobe
Hi,
I need a way to list all open PO's via X++. Looking at the Stock Management
Tab, I have the arrival overview form which lists everything that is expected
to be coming in. I want a way to get that data via x~++.
WMSArrivalOverviewTmp
WMSArrivalDetailTmp
However both are empty.
PurchTable::vendOpenOrders("");
I would have hoped this would show all open PO's, but only lists 4, all of
which are closed.
I would like to list the PO's and their associated items via x++.
Can someone please point me in the right direction?
Thanks in advance.
obewankenobe
2008-11-17 17:56:01 UTC
Permalink
I have tried the public methods within the WMSArrivalOverviewGeneration class
including construct, generateFromForm and getInPRogressTotal, but none seem
to return any useful results. Using generateFromForm seems to keep AX busy
for a long time with nothign really useful returned.

I have also tried the following:

_wmsAOTmp.setTmpData(_wmsAOTmp);

_wmsADTmp.setTmpData(_wmsADTmp);

the setTmpData seems to run much faster than the
WMSArrivalOverviewGeneration class methods, but only returns 1 record. I am
not sure how to filter a query for setTmpData to ensure I get usable results.

Again, if anyone can help it is much appreciated.

Regards,
Post by obewankenobe
Thanks for the help. But when I try to use that class and method, I get the
The method is declared protected and may only be called from methods in
classes derived from WMSArrivalOverviewGeneration.
What am I doing wrong?
Thanks
Post by unknown
If you look at the way WMSArrivalOverview form is implemented, you will be
WMSArrivalOverviewGeneration wmsArrivalOverviewGeneration =
WMSArrivalOverviewGeneration::construct();
;
wmsArrivalOverviewGeneration.parmWmsArrivalOverviewTmp(_wmsArrivalOverviewTmp);
wmsArrivalOverviewGeneration.parmWmsArrivalDetailTmp(_wmsArrivalDetailTmp);
wmsArrivalOverviewGeneration.parmWmsArrivalOverviewOptions(WMSArrivalOverviewOptions::newFromPacked(_packedOptions));
return wmsArrivalOverviewGeneration.fillTables();
The main method is fillTables()
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by obewankenobe
Hi,
I need a way to list all open PO's via X++. Looking at the Stock Management
Tab, I have the arrival overview form which lists everything that is expected
to be coming in. I want a way to get that data via x~++.
WMSArrivalOverviewTmp
WMSArrivalDetailTmp
However both are empty.
PurchTable::vendOpenOrders("");
I would have hoped this would show all open PO's, but only lists 4, all of
which are closed.
I would like to list the PO's and their associated items via x++.
Can someone please point me in the right direction?
Thanks in advance.
Continue reading on narkive:
Loading...