Getting Ship To Detail in Customer Shipment Entry

Mark,



Thanks for the taking the time to explain, and the humor.. funny.. ill
have to try that method next time I have an use for it (which doesn't
take long at the rate were doing customizations here). That's the issue
ive had with fkv's in the past, if the link is complex (beyond one
field) it seems to fall down fairly quickly. I think I did one a while
back where I did the FKV programmatically with a UD table that worked
well using multiple links, but haven't tried that with one of their
standard tables.





Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mark Wonsil
Sent: Wednesday, July 06, 2011 9:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Getting Ship To Detail in Customer Shipment Entry





Hey Rob,

> Just curious mark, being a budding young (tongue in cheek on the
young)
> programmer.. why did you use the getdata method?

Being a constantly de-flowered programmer, I found that the parameter
signature fit what I wanted. The getData method had two parameters:
CustNum and ShipToNum and it returned exactly one row with the entire
record. I wasn't sure if the SearchAdapter would return all columns
(it may very well have) or if I would have to search through all of
the shipTo records in a loop to find the one I was looking for so I
used the more convenient method.

I later used the getData method to return the SalesOrder linked to
from ShipDtl to get ShortChar03 PONum. That worked MUCH better than
the FKV which was throwing errors about not being able to find those
fields in "this context". Whatever the hell that meant...

I'm starting to think that the "F" in FKV does not stand for
"foreign"...

;-)

Mark W.





[Non-text portions of this message have been removed]
OK, this is got to be easy and I missing something simple. I have a
customization that needs to create a text file with the ship-to address
split out into its pieces (name, address1, address2, address3, city, state,
etc). Customer Shipment Entry has it all in one field but ShipTo has what I
want. Fine, I'll just create a FKV to the ShipTo table and loop through the
ShipTo dataViews until I get one that matches. No luck. It only returns one
ShipTo record but not the one on the shipment.

EpiDataView edvTo =
((EpiDataView)(oTrans.EpiDataViews["ShipTo"]));

I set up the ShipTo EpiDataView as a FKV linking via the CustNum.

MessageBox.Show("shipTo:" +
(edvTo.dataView.Count).ToString());

Returns a count of 1 even thought there are about 90 ship to records for
this customer.

Any thoughts customization gurus?

Mark W.


[Non-text portions of this message have been removed]
I know an fkv is simpler (theoretically)...but could you do a listlookup
using the custnum and the shiptonum?





Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mark Wonsil
Sent: Tuesday, July 05, 2011 1:26 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Getting Ship To Detail in Customer Shipment Entry





OK, this is got to be easy and I missing something simple. I have a
customization that needs to create a text file with the ship-to address
split out into its pieces (name, address1, address2, address3, city,
state,
etc). Customer Shipment Entry has it all in one field but ShipTo has
what I
want. Fine, I'll just create a FKV to the ShipTo table and loop through
the
ShipTo dataViews until I get one that matches. No luck. It only returns
one
ShipTo record but not the one on the shipment.

EpiDataView edvTo =
((EpiDataView)(oTrans.EpiDataViews["ShipTo"]));

I set up the ShipTo EpiDataView as a FKV linking via the CustNum.

MessageBox.Show("shipTo:" +
(edvTo.dataView.Count).ToString());

Returns a count of 1 even thought there are about 90 ship to records for
this customer.

Any thoughts customization gurus?

Mark W.

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Do all of your files have text entered for address2 and address3? I ask
because when we tried to print the ShipTo address on our Sales Order Pick
List, it did not work unless all those fields had text in them. I ended up
removing address2 and address3 since it was only being used rarely and for a
reference. I don't know if it helps, but it's something to test.



Michelle Giesige



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Mark Wonsil
Sent: Tuesday, July 05, 2011 2:26 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Getting Ship To Detail in Customer Shipment Entry





OK, this is got to be easy and I missing something simple. I have a
customization that needs to create a text file with the ship-to address
split out into its pieces (name, address1, address2, address3, city, state,
etc). Customer Shipment Entry has it all in one field but ShipTo has what I
want. Fine, I'll just create a FKV to the ShipTo table and loop through the
ShipTo dataViews until I get one that matches. No luck. It only returns one
ShipTo record but not the one on the shipment.

EpiDataView edvTo =
((EpiDataView)(oTrans.EpiDataViews["ShipTo"]));

I set up the ShipTo EpiDataView as a FKV linking via the CustNum.

MessageBox.Show("shipTo:" +
(edvTo.dataView.Count).ToString());

Returns a count of 1 even thought there are about 90 ship to records for
this customer.

Any thoughts customization gurus?

Mark W.

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Well, I sort of went Rob's route but instead of using the
SearchAdapter, I used the getData method of the ShipToAdapter:

// Find shipTo
ShipToAdapter adapterShipTo = new ShipToAdapter(oTrans);
adapterShipTo.BOConnect();

int custNum = ((int)edvHead.dataView[edvHead.Row]["CustNum"]);
string shipToNum = ((string)edvHead.dataView[edvHead.Row]["ShipToNum"]);

// Call Adapter
System.Data.DataSet dsShipTo = adapterShipTo.GetData(custNum, shipToNum);

shp = dsShipTo.Tables["ShipTo"].Rows[0]["Name"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address1"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address2"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address3"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Country"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Zip"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["City"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Zip"];

adapterShipTo.Dispose();
adapterShipTo = null;

Thanks!

Mark W.
Just curious mark, being a budding young (tongue in cheek on the young)
programmer.. why did you use the getdata method?







Rob Bucek

Production Control Manager

PH: (715) 284-5376 ext 311

Mobile: (715)896-0590

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Mark Wonsil
Sent: Tuesday, July 05, 2011 5:31 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Getting Ship To Detail in Customer Shipment Entry





Well, I sort of went Rob's route but instead of using the
SearchAdapter, I used the getData method of the ShipToAdapter:

// Find shipTo
ShipToAdapter adapterShipTo = new ShipToAdapter(oTrans);
adapterShipTo.BOConnect();

int custNum = ((int)edvHead.dataView[edvHead.Row]["CustNum"]);
string shipToNum = ((string)edvHead.dataView[edvHead.Row]["ShipToNum"]);

// Call Adapter
System.Data.DataSet dsShipTo = adapterShipTo.GetData(custNum,
shipToNum);

shp = dsShipTo.Tables["ShipTo"].Rows[0]["Name"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address1"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address2"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Address3"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Country"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Zip"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["City"];
shp = shp + "^" + dsShipTo.Tables["ShipTo"].Rows[0]["Zip"];

adapterShipTo.Dispose();
adapterShipTo = null;

Thanks!

Mark W.





[Non-text portions of this message have been removed]
Hey Rob,

> Just curious mark, being a budding young (tongue in cheek on the young)
> programmer.. why did you use the getdata method?

Being a constantly de-flowered programmer, I found that the parameter
signature fit what I wanted. The getData method had two parameters:
CustNum and ShipToNum and it returned exactly one row with the entire
record. I wasn't sure if the SearchAdapter would return all columns
(it may very well have) or if I would have to search through all of
the shipTo records in a loop to find the one I was looking for so I
used the more convenient method.

I later used the getData method to return the SalesOrder linked to
from ShipDtl to get ShortChar03 PONum. That worked MUCH better than
the FKV which was throwing errors about not being able to find those
fields in "this context". Whatever the hell that meant...

I'm starting to think that the "F" in FKV does not stand for "foreign"...

;-)

Mark W.