This is very strange. This exact bit of code, while it does not work outside of Epicor, it works when calling the BO from inside Epicor.
________________________________
From: Ted Koch <tkoch77@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Tuesday, March 26, 2013 5:28 PM
Subject: Re: [Vantage] Re: CustShip BO issue
Thanks Adam,
I was able to create the entire pack slip by adding custShipDS.ShipDtl.Rows(0)("RowMod") = "U" in between GetOrderLineInfo and GetOrderRelInfo.
At the same time I also want to mark the packing slip as ReadyToInvoice. When I do this and try to update the packing slip it tells me the packing slip is not open. Cannot update. It doesn't matter if I use UpdateMaster or Update. Here is the code now. Any ideas?
Dim custShip As New CustShip(Session.ConnectionPool)
Dim custShipDS As New CustShipDataSet
custShip.GetNewShipHead(custShipDS)
Dim packNum As Integer = 0
Dim custNum As Integer = 9
custShip.GetHeadOrderInfo(orderNum, "", custShipDS)
custShip.BuildShipToCustomerList(orderNum, "")
custShip.BuildShipToList(orderNum, custNum, "")
custShip.UpdateMaster(custShipDS, False, False, False, False, False,
False, False, 0, custNum, "", "", "", "", "", "", "", "", "", "", False,
False, "", "", False, False, False)
packNum = custShipDS.ShipHead.Rows(0)("PackNum")
custShip.POGetNew(0, packNum, "")
custShip.POGetDtlList(packNum, 0, "PACK", "")
custShip.GetNewOrdrShipDtl(custShipDS, packNum, 0)
custShip.GetOrderInfo(orderNum, "", custShipDS)
custShip.GetOrderLineInfo(custShipDS, 0, 1, "Show")
custShipDS.ShipHead.Rows(0)("RowMod") = "U"
custShip.GetOrderRelInfo(custShipDS, 0, 1, True)
custShipDS.ShipHead.Rows(0)("ReadyToInvoice") = True
custShip.UpdateMaster(custShipDS, True, True, False, True, True, False, True, packNum, custNum, "", "", "", "", "", "", "", "", "", "", False, False, "", "", False, False, False)
'custShip.Update(custShipDS)
________________________________
From: saberlogic_aellis <aellis@...>
To: vantage@yahoogroups.com
Sent: Friday, March 22, 2013 8:28 AM
Subject: [Vantage] Re: CustShip BO issue
Not saying the way you are trying to do it won't work, but I normally do my BL calls a little bit differently. Here is more how I would typically do it (this is copy and pasted from a 9.05 customization that had these bits called from various places so this might not work exactly as-is but hopefully it will steer you in the right direction):
Dim adCustShip As CustShipAdapter
adCustShip = New CustShipAdapter(HHConfirmShipForm) ' The form name you are calling this from would have to go here
adCustShip.BOConnect()
adCustShip.GetNewShipHead()
adCustShip.GetHeadOrderInfo("YOURORDERNUMBER", "")
adCustShip.Update()
Dim currentPackId As String = adCustShip.CustShipData.ShipHead.Rows(0)("PackNum").ToString
adCustShip.GetNewOrdrShipDtl(currentPackId, "YOURORDERNUMBER")
adCustShip.GetOrderInfo("YOURORDERNUMBER", "")
adCustShip.GetOrderLineInfo(0, YOURORDERLINE, YOURPARTNUMBER)
adCustShip.CustShipData.ShipHead.Rows(0)("RowMod") = "U"
adCustShip.GetOrderRelInfo(0, YOURORDERRELEASE, True)
adCustShip.Update()
Good Luck,
Adam
________________________________
From: Ted Koch <tkoch77@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Tuesday, March 26, 2013 5:28 PM
Subject: Re: [Vantage] Re: CustShip BO issue
Thanks Adam,
I was able to create the entire pack slip by adding custShipDS.ShipDtl.Rows(0)("RowMod") = "U" in between GetOrderLineInfo and GetOrderRelInfo.
At the same time I also want to mark the packing slip as ReadyToInvoice. When I do this and try to update the packing slip it tells me the packing slip is not open. Cannot update. It doesn't matter if I use UpdateMaster or Update. Here is the code now. Any ideas?
Dim custShip As New CustShip(Session.ConnectionPool)
Dim custShipDS As New CustShipDataSet
custShip.GetNewShipHead(custShipDS)
Dim packNum As Integer = 0
Dim custNum As Integer = 9
custShip.GetHeadOrderInfo(orderNum, "", custShipDS)
custShip.BuildShipToCustomerList(orderNum, "")
custShip.BuildShipToList(orderNum, custNum, "")
custShip.UpdateMaster(custShipDS, False, False, False, False, False,
False, False, 0, custNum, "", "", "", "", "", "", "", "", "", "", False,
False, "", "", False, False, False)
packNum = custShipDS.ShipHead.Rows(0)("PackNum")
custShip.POGetNew(0, packNum, "")
custShip.POGetDtlList(packNum, 0, "PACK", "")
custShip.GetNewOrdrShipDtl(custShipDS, packNum, 0)
custShip.GetOrderInfo(orderNum, "", custShipDS)
custShip.GetOrderLineInfo(custShipDS, 0, 1, "Show")
custShipDS.ShipHead.Rows(0)("RowMod") = "U"
custShip.GetOrderRelInfo(custShipDS, 0, 1, True)
custShipDS.ShipHead.Rows(0)("ReadyToInvoice") = True
custShip.UpdateMaster(custShipDS, True, True, False, True, True, False, True, packNum, custNum, "", "", "", "", "", "", "", "", "", "", False, False, "", "", False, False, False)
'custShip.Update(custShipDS)
________________________________
From: saberlogic_aellis <aellis@...>
To: vantage@yahoogroups.com
Sent: Friday, March 22, 2013 8:28 AM
Subject: [Vantage] Re: CustShip BO issue
Not saying the way you are trying to do it won't work, but I normally do my BL calls a little bit differently. Here is more how I would typically do it (this is copy and pasted from a 9.05 customization that had these bits called from various places so this might not work exactly as-is but hopefully it will steer you in the right direction):
Dim adCustShip As CustShipAdapter
adCustShip = New CustShipAdapter(HHConfirmShipForm) ' The form name you are calling this from would have to go here
adCustShip.BOConnect()
adCustShip.GetNewShipHead()
adCustShip.GetHeadOrderInfo("YOURORDERNUMBER", "")
adCustShip.Update()
Dim currentPackId As String = adCustShip.CustShipData.ShipHead.Rows(0)("PackNum").ToString
adCustShip.GetNewOrdrShipDtl(currentPackId, "YOURORDERNUMBER")
adCustShip.GetOrderInfo("YOURORDERNUMBER", "")
adCustShip.GetOrderLineInfo(0, YOURORDERLINE, YOURPARTNUMBER)
adCustShip.CustShipData.ShipHead.Rows(0)("RowMod") = "U"
adCustShip.GetOrderRelInfo(0, YOURORDERRELEASE, True)
adCustShip.Update()
Good Luck,
Adam
--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I exported the custShipDS to XML format and tried using the BL Tester. It is giving me the error:
>
> ttShipHead: Record not available
>
>
>
>
> ________________________________
>Â From: Jose Gomez <jose@...>
> To: Vantage <vantage@yahoogroups.com>
> Sent: Thursday, March 21, 2013 2:50 PM
> Subject: Re: [Vantage] CustShip BO issue
>Â
> What version?
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>Â <http://www.facebook.com/josegomez>
> Â <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> Â <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> Â <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Thu, Mar 21, 2013 at 2:35 PM, Jose Gomez <jose@...> wrote:
>
> > Do you still have the trace? If so send it over.
> >
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> >Â Â <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> >Â Â <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
> >Â Â <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> > On Thu, Mar 21, 2013 at 2:30 PM, tkoch77 <tkoch77@...> wrote:
> >
> >> **
> >>
> >>
> >> Hi all,
> >>
> >> Can anyone take a look at this, I am trying to create a new packing slip
> >> in customer shipment entry from a button on the sales order line. I have
> >> run a trace and the code below follows exactly what the trace is doing. It
> >> errors out at custShip.GetManifestInfo(orderNum, packNum, custShipDS)
> >> saying Record not available? I have verified it is passing the correct
> >> orderNum and packNum.
> >>
> >> Dim custShip As New CustShip(Session.ConnectionPool)
> >> Dim custShipDS As New CustShipDataSet
> >> custShip.GetNewShipHead(custShipDS)
> >> Dim packNum As Integer = 0
> >> Dim custNum As Integer = 9
> >> custShip.GetHeadOrderInfo(orderNum, "", custShipDS)
> >> custShip.BuildShipToCustomerList(orderNum, "")
> >> custShip.BuildShipToList(orderNum, custNum, "")
> >> custShip.UpdateMaster(custShipDS, False, False, False, False, False,
> >> False, False, 0, custNum, "", "", "", "", "", "", "", "", "", "", False,
> >> False, "", "", False, False, False)
> >> packNum = custShipDS.ShipHead.Rows(0)("PackNum")
> >> custShip.POGetNew(0, packNum, "")
> >> custShip.POGetDtlList(packNum, 0, "PACK", "")
> >> custShip.GetNewOrdrShipDtl(custShipDS, packNum, 0)
> >> custShip.GetOrderInfo(orderNum, "", custShipDS)
> >> custShip.GetManifestInfo(orderNum, packNum, custShipDS)
> >> custShip.CheckPrePartInfo("", orderNum, 1, "", False, "", "Show")
> >> custShip.GetOrderLineInfo(custShipDS, 0, 1, "Show")
> >> custShip.GetOrderRelInfo(custShipDS, 0, 1, True)
> >>
> >> Thanks for any input,
> >> -Ted
> >>
> >>Â
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
> (2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
> [Non-text portions of this message have been removed]
>
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]