Retrieve and display Part UPC Code on Sales Order Lines tab

**** Update ****

I ended up using a BPM to populate the Part.UPCCode1 field after the ChangePartNumMaster method call. I do not believe this added any time to the part look up at all. I will be resorting to BPM's before all other methods from now on.

- Scott

--- In vantage@yahoogroups.com, Mark Wonsil <mark_wonsil@...> wrote:
>
> Bernie is probably correct for things like part number where the key is
> unique. I used the BAQ method for filtering PartMtl based on a selection on
> Part. Waaaay faster than using BOs directly.
>
> Mark W .
>
> On Tuesday, April 16, 2013, bw2868bond wrote:
>
> > **
> >
> >
> > Wouldn't it be easier and faster to a FKV ?
> > OrderDtl.PartNum -> Part.PartNum
> >
> > --- In vantage@yahoogroups.com <javascript:_e({}, 'cvml',
> > 'vantage%40yahoogroups.com');>, "thedemondamian" <sheath@> wrote:
> > >
> > > Mark,
> > >
> > > I have used that feature before. I will set it up in this instance and
> > see how the response time is.
> > >
> > > Thanks for the suggestion.
> > > Scott
> > >
> > > --- In vantage@yahoogroups.com <javascript:_e({}, 'cvml',
> > 'vantage%40yahoogroups.com');>, Mark Wonsil <mark_wonsil@> wrote:
> > > >
> > > > Hi Scott,
> > > >
> > > > Look in the group for the BAQ object. I have found (especially when
> > linking
> > > > tables) that you can create a BAQ that returns your field and then
> > update
> > > > the criteria dynamically. Runs pretty quickly actually.
> > > >
> > > > http://tech.groups.yahoo.com/group/vantage/message/115367
> > > >
> > > > Mark W.
> > > >
> > > >
> > > > On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@>wrote:
> > > >
> > > > > **
> > > > >
> > > > >
> > > > > I have tried using the BOReader object with the following code:
> > > > >
> > > > > Dim boReader As BOReader = New
> > BOReader(oTrans.Session.ConnectionPool)
> > > > > Dim wc as String = String.Format("PartNum = '" & args.ProposedValue
> > & "'")
> > > > > Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
> > > > >
> > > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > > >
> > > > > and by using the Part Adapter with this code:
> > > > >
> > > > > Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> > > > > adPart.BOConnect()
> > > > >
> > > > > Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> > > > > Dim MorePages as Boolean = false
> > > > >
> > > > > Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> > > > > opts.NamedSearch.WhereClauses.Add("Part",wc)
> > > > >
> > > > > Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
> > > > >
> > > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > > >
> > > > > adPart.Dispose()
> > > > >
> > > > > Both of these methods add a minimum if 20 seconds to the retrieval
> > of the
> > > > > Part information on the Lines tab. That is unacceptable when the
> > default
> > > > > method only takes between 1 or 2 seconds.
> > > > >
> > > > > Does anyone know of a better way to get that field. All I want is
> > the UPC
> > > > > Code for the Part that is selected.
> > > > >
> > > > > - Scott
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
I have tried using the BOReader object with the following code:

Dim boReader As BOReader = New BOReader(oTrans.Session.ConnectionPool)
Dim wc as String = String.Format("PartNum = '" & args.ProposedValue & "'")
Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))

txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)



and by using the Part Adapter with this code:


Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
adPart.BOConnect()

Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
Dim MorePages as Boolean = false

Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
opts.NamedSearch.WhereClauses.Add("Part",wc)

Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)

txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)

adPart.Dispose()


Both of these methods add a minimum if 20 seconds to the retrieval of the Part information on the Lines tab. That is unacceptable when the default method only takes between 1 or 2 seconds.

Does anyone know of a better way to get that field. All I want is the UPC Code for the Part that is selected.

- Scott
Hi Scott,

Look in the group for the BAQ object. I have found (especially when linking
tables) that you can create a BAQ that returns your field and then update
the criteria dynamically. Runs pretty quickly actually.

http://tech.groups.yahoo.com/group/vantage/message/115367

Mark W.


On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@...>wrote:

> **
>
>
> I have tried using the BOReader object with the following code:
>
> Dim boReader As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> Dim wc as String = String.Format("PartNum = '" & args.ProposedValue & "'")
> Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
>
> txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
>
> and by using the Part Adapter with this code:
>
> Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> adPart.BOConnect()
>
> Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> Dim MorePages as Boolean = false
>
> Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> opts.NamedSearch.WhereClauses.Add("Part",wc)
>
> Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
>
> txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
>
> adPart.Dispose()
>
> Both of these methods add a minimum if 20 seconds to the retrieval of the
> Part information on the Lines tab. That is unacceptable when the default
> method only takes between 1 or 2 seconds.
>
> Does anyone know of a better way to get that field. All I want is the UPC
> Code for the Part that is selected.
>
> - Scott
>
>
>


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

I have used that feature before. I will set it up in this instance and see how the response time is.

Thanks for the suggestion.
Scott

--- In vantage@yahoogroups.com, Mark Wonsil <mark_wonsil@...> wrote:
>
> Hi Scott,
>
> Look in the group for the BAQ object. I have found (especially when linking
> tables) that you can create a BAQ that returns your field and then update
> the criteria dynamically. Runs pretty quickly actually.
>
> http://tech.groups.yahoo.com/group/vantage/message/115367
>
> Mark W.
>
>
> On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@...>wrote:
>
> > **
> >
> >
> > I have tried using the BOReader object with the following code:
> >
> > Dim boReader As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > Dim wc as String = String.Format("PartNum = '" & args.ProposedValue & "'")
> > Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
> >
> > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> >
> > and by using the Part Adapter with this code:
> >
> > Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> > adPart.BOConnect()
> >
> > Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> > Dim MorePages as Boolean = false
> >
> > Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> > opts.NamedSearch.WhereClauses.Add("Part",wc)
> >
> > Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
> >
> > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> >
> > adPart.Dispose()
> >
> > Both of these methods add a minimum if 20 seconds to the retrieval of the
> > Part information on the Lines tab. That is unacceptable when the default
> > method only takes between 1 or 2 seconds.
> >
> > Does anyone know of a better way to get that field. All I want is the UPC
> > Code for the Part that is selected.
> >
> > - Scott
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Wouldn't it be easier and faster to a FKV ?
OrderDtl.PartNum -> Part.PartNum

--- In vantage@yahoogroups.com, "thedemondamian" <sheath@...> wrote:
>
> Mark,
>
> I have used that feature before. I will set it up in this instance and see how the response time is.
>
> Thanks for the suggestion.
> Scott
>
> --- In vantage@yahoogroups.com, Mark Wonsil <mark_wonsil@> wrote:
> >
> > Hi Scott,
> >
> > Look in the group for the BAQ object. I have found (especially when linking
> > tables) that you can create a BAQ that returns your field and then update
> > the criteria dynamically. Runs pretty quickly actually.
> >
> > http://tech.groups.yahoo.com/group/vantage/message/115367
> >
> > Mark W.
> >
> >
> > On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@>wrote:
> >
> > > **
> > >
> > >
> > > I have tried using the BOReader object with the following code:
> > >
> > > Dim boReader As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > > Dim wc as String = String.Format("PartNum = '" & args.ProposedValue & "'")
> > > Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
> > >
> > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > >
> > > and by using the Part Adapter with this code:
> > >
> > > Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> > > adPart.BOConnect()
> > >
> > > Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> > > Dim MorePages as Boolean = false
> > >
> > > Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> > > opts.NamedSearch.WhereClauses.Add("Part",wc)
> > >
> > > Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
> > >
> > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > >
> > > adPart.Dispose()
> > >
> > > Both of these methods add a minimum if 20 seconds to the retrieval of the
> > > Part information on the Lines tab. That is unacceptable when the default
> > > method only takes between 1 or 2 seconds.
> > >
> > > Does anyone know of a better way to get that field. All I want is the UPC
> > > Code for the Part that is selected.
> > >
> > > - Scott
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Bernie is probably correct for things like part number where the key is
unique. I used the BAQ method for filtering PartMtl based on a selection on
Part. Waaaay faster than using BOs directly.

Mark W .

On Tuesday, April 16, 2013, bw2868bond wrote:

> **
>
>
> Wouldn't it be easier and faster to a FKV ?
> OrderDtl.PartNum -> Part.PartNum
>
> --- In vantage@yahoogroups.com <javascript:_e({}, 'cvml',
> 'vantage%40yahoogroups.com');>, "thedemondamian" <sheath@...> wrote:
> >
> > Mark,
> >
> > I have used that feature before. I will set it up in this instance and
> see how the response time is.
> >
> > Thanks for the suggestion.
> > Scott
> >
> > --- In vantage@yahoogroups.com <javascript:_e({}, 'cvml',
> 'vantage%40yahoogroups.com');>, Mark Wonsil <mark_wonsil@> wrote:
> > >
> > > Hi Scott,
> > >
> > > Look in the group for the BAQ object. I have found (especially when
> linking
> > > tables) that you can create a BAQ that returns your field and then
> update
> > > the criteria dynamically. Runs pretty quickly actually.
> > >
> > > http://tech.groups.yahoo.com/group/vantage/message/115367
> > >
> > > Mark W.
> > >
> > >
> > > On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@>wrote:
> > >
> > > > **
> > > >
> > > >
> > > > I have tried using the BOReader object with the following code:
> > > >
> > > > Dim boReader As BOReader = New
> BOReader(oTrans.Session.ConnectionPool)
> > > > Dim wc as String = String.Format("PartNum = '" & args.ProposedValue
> & "'")
> > > > Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
> > > >
> > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > >
> > > > and by using the Part Adapter with this code:
> > > >
> > > > Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> > > > adPart.BOConnect()
> > > >
> > > > Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> > > > Dim MorePages as Boolean = false
> > > >
> > > > Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> > > > opts.NamedSearch.WhereClauses.Add("Part",wc)
> > > >
> > > > Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
> > > >
> > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > >
> > > > adPart.Dispose()
> > > >
> > > > Both of these methods add a minimum if 20 seconds to the retrieval
> of the
> > > > Part information on the Lines tab. That is unacceptable when the
> default
> > > > method only takes between 1 or 2 seconds.
> > > >
> > > > Does anyone know of a better way to get that field. All I want is
> the UPC
> > > > Code for the Part that is selected.
> > > >
> > > > - Scott
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>


[Non-text portions of this message have been removed]
The FKV takes almost as long as the BO methods. It is taking between 15 and 20 seconds.

The problem I see with getting the info from a BAQ is that you have to use the BAQ Combo. I do not need to populate a combo. I only need one value returned. I do not see a way to use a BAQ to populate text box other than using the DynamicQueryAdapter to call the BAQ.

- Scott

--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> Wouldn't it be easier and faster to a FKV ?
> OrderDtl.PartNum -> Part.PartNum
>
> --- In vantage@yahoogroups.com, "thedemondamian" <sheath@> wrote:
> >
> > Mark,
> >
> > I have used that feature before. I will set it up in this instance and see how the response time is.
> >
> > Thanks for the suggestion.
> > Scott
> >
> > --- In vantage@yahoogroups.com, Mark Wonsil <mark_wonsil@> wrote:
> > >
> > > Hi Scott,
> > >
> > > Look in the group for the BAQ object. I have found (especially when linking
> > > tables) that you can create a BAQ that returns your field and then update
> > > the criteria dynamically. Runs pretty quickly actually.
> > >
> > > http://tech.groups.yahoo.com/group/vantage/message/115367
> > >
> > > Mark W.
> > >
> > >
> > > On Mon, Apr 15, 2013 at 2:23 PM, thedemondamian <sheath@>wrote:
> > >
> > > > **
> > > >
> > > >
> > > > I have tried using the BOReader object with the following code:
> > > >
> > > > Dim boReader As BOReader = New BOReader(oTrans.Session.ConnectionPool)
> > > > Dim wc as String = String.Format("PartNum = '" & args.ProposedValue & "'")
> > > > Dim dsPart as DataSet = boReader.GetRows("Part", wc, ("UPCCode1"))
> > > >
> > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > >
> > > > and by using the Part Adapter with this code:
> > > >
> > > > Dim adPart as PartAdapter = New PartAdapter(SalesOrderForm)
> > > > adPart.BOConnect()
> > > >
> > > > Dim wc as String = "PartNum = '" & args.ProposedValue & "'"
> > > > Dim MorePages as Boolean = false
> > > >
> > > > Dim opts as SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> > > > opts.NamedSearch.WhereClauses.Add("Part",wc)
> > > >
> > > > Dim dsPart as Data.DataSet = adPart.GetRows(opts, MorePages)
> > > >
> > > > txtUPCCode.text = dsPart.Tables(0).Rows(0)(0)
> > > >
> > > > adPart.Dispose()
> > > >
> > > > Both of these methods add a minimum if 20 seconds to the retrieval of the
> > > > Part information on the Lines tab. That is unacceptable when the default
> > > > method only takes between 1 or 2 seconds.
> > > >
> > > > Does anyone know of a better way to get that field. All I want is the UPC
> > > > Code for the Part that is selected.
> > > >
> > > > - Scott
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>