V8 - Trying to figure out how to add a sub-table view

Did that on my 8.00.811 test setup - which is down and out now.
Probably will not have 8.03 up and running again until next week.

Sorry.

--- In vantage@yahoogroups.com, "Joe Rojas" <jrojas@...> wrote:
>
> I followed your example to the letter and still no luck.
>
> What version are you on? I'm on 8.03.304C. I wonder if I've stumbled
> across a bug...
>
>
>
> Thanks,
>
> Joe Rojas
>
> IT Manager
>
> TNCO, Inc.
>
> 781-447-6661 x7506
>
> jrojas@...
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf
> Of bw2868bond
> Sent: Monday, March 19, 2007 2:04 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-
table
> view
>
>
>
> I guess that is why there is not too much left on the top of my
> head :-)
>
> Any how, I created a FKV on SugPoDtl called Part
> Column Name: SugPoDtl.PartNum
> Like Column Value: Part.PartNum
>
> Then I created a STV called PartPlant
> Parent view being Part.
> Sub Table Name: PartPlant
> Link Columns View: Part
>
> Parent View Columns:
> Part.Company -> PartPlant.Company
> Part.PartNum -> PartPlant.PartNum
>
> I save the customization, exited and re opened. I added a text box
> and gave the data source as PartPlant and field as LeadTime and it
> works OK
>
> Check to see if the views are using the same tables/links...
>
> --- In vantage@yahoogroups.com <mailto:vantage%
40yahoogroups.com> , "Joe
> Rojas" <jrojas@> wrote:
> >
> > Unfortunately I don't even know what that means :-(
> >
> >
> >
> > I noticed something weird when creating the sub-table view.
> >
> > The FKV I created is called PartInfo and the STV I created off of
> > PartInfo is called PartPlantView.
> >
> >
> >
> > When I go into the Data Tools window and select my STV is shows
> that the
> > "Link Columns View" as PartInfo but when I click Edit Custom View
it
> > changes to SugPoDtl.
> >
> > Also, all the columns in "Parent View Columns" are for SugPoDtl. I
> > wonder if this is part of my problem....
> >
> >
> >
> > I wish there was better documentation of how to use the data
tools.
> >
> >
> >
> > Thanks,
> >
> > Joe Rojas
> >
> > IT Manager
> >
> > TNCO, Inc.
> >
> > 781-447-6661 x7506
> >
> > jrojas@
> >
> >
> >
> > ________________________________
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%
40yahoogroups.com> ] On
> Behalf
> > Of bw2868bond
> > Sent: Monday, March 19, 2007 10:33 AM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-
> table
> > view
> >
> >
> >
> > Off the top of my head.... Did you supply a constant for the
Plant ?
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%
> 40yahoogroups.com> , "Joe
> > Rojas" <jrojas@> wrote:
> > >
> > > Hello,
> > >
> > >
> > >
> > > We notice that PO Suggestions are not taking into account the
> lead
> > time
> > > that is specified in PartPlant. I called tech support and
they're
> > on it.
> > >
> > > In the mean time, I figured I would add a field to the PO
> > Suggestions
> > > screen that at least shows the lead time from PartPlant so that
> > buyer
> > > see something.
> > >
> > >
> > >
> > > I created a foreign key view from SugPoDtl to the Part table
and
> > then a
> > > sub-table view from my foreign key view to the PartPlant table
> using
> > > Company and PartNum as the link columns.
> > >
> > > I then added a texbox that is bound to PartPlant.LeadTime but
> this
> > box
> > > doesn't show the values in this field. In fact it shows nothing.
> > >
> > >
> > >
> > > Am I missing a step?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Joe Rojas
> > >
> > > IT Manager
> > >
> > > TNCO, Inc.
> > >
> > > 781-447-6661 x7506
> > >
> > > jrojas@
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Does anyone have an example of creating a new lot via code (and
possibly then giving it a qty and setting it's cost)? I have code that
is creating a part automatically, now I need to fill in the rest of the
details.
Thanks!
Adam
completed this, but populating a lot and assigning cost is the tricky
part. For anyone else, I:
(in the part form)

1. load up a part using GetById
2. create a new partlot data row
3. fill in values
4. save object
so:

Dim partAdapt As PartAdapter = New PartAdapter(PartForm)
partAdapt.BOConnect()
partAdapt.GetByID(partNum)

Dim dr As DataRow = partAdapt.PartData.Tables("PartLot").NewRow()
SetLotValues(dr, "your new part number goes here", "Test Lot")
partAdapt.PartData.Tables("PartLot").Rows.Add(dr)
partAdapt.Update()

Private Sub SetLotValues(dr as DataRow, partNum as String, lotNum as
string)
dr("Company") = "YOUR COMPANY ID HERE AS SET IN COMPANY CONFIG"
dr("PartNum") = partNum
dr("LotNum") = lotNum
dr("PartLotDescription") = ""
dr("OnHand") = false
dr("LotLaborCost") = 0
dr("LotBurdenCost") = 0
dr("LotMaterialCost") = 0
dr("LotSubContCost") = 0
dr("LotMtlBurCost") = 0
dr("Character01") = ""
dr("Character02") = ""
dr("Character03") = ""
dr("Character04") = ""
dr("Character05") = ""
dr("Character06") = ""
dr("Character07") = ""
dr("Character08") = ""
dr("Character09") = ""
dr("Character10") = ""
dr("Number01") = 0
dr("Number02") = 0
dr("Number03") = 0
dr("Number04") = 0
dr("Number05") = 0
dr("Number06") = 0
dr("Number07") = 0
dr("Number08") = 0
dr("Number09") = 0
dr("Number10") = 0
dr("CheckBox01") = false
dr("CheckBox02") = false
dr("CheckBox03") = false
dr("CheckBox04") = false
dr("CheckBox05") = false
dr("Number11") = 0
dr("Number12") = 0
dr("Number13") = 0
dr("Number14") = 0
dr("Number15") = 0
dr("Number16") = 0
dr("Number17") = 0
dr("Number18") = 0
dr("Number19") = 0
dr("Number20") = 0
dr("CheckBox06") = false
dr("CheckBox07") = false
dr("CheckBox08") = false
dr("CheckBox09") = false
dr("CheckBox10") = false
dr("CheckBox11") = false
dr("CheckBox12") = false
dr("CheckBox13") = false
dr("CheckBox14") = false
dr("CheckBox15") = false
dr("CheckBox16") = false
dr("CheckBox17") = false
dr("CheckBox18") = false
dr("CheckBox19") = false
dr("CheckBox20") = false
dr("ShortChar01") = ""
dr("ShortChar02") = ""
dr("ShortChar03") = ""
dr("ShortChar04") = ""
dr("ShortChar05") = ""
dr("ShortChar06") = ""
dr("ShortChar07") = ""
dr("ShortChar08") = ""
dr("ShortChar09") = ""
dr("ShortChar10") = ""
dr("ShipDocAvail") = false
dr("TransactionSource") = ""
dr("ScrLotBurdenCost") = 0
dr("ScrLotLaborCost") = 0
dr("ScrLotMaterialCost") = 0
dr("ScrLotMtlBurCost") = 0
dr("ScrLotSubContCost") = 0
dr("Plant") = ""
dr("OnHandQty") = 0
dr("PartNumPartDescription") = ""
dr("PartNumTrackDimension") = false
dr("PartNumTrackLots") = false
dr("PartNumTrackSerialNum") = false
dr("RowIdent") = ""
dr("RowMod") = "A"
End Sub


--- In vantage@yahoogroups.com, "adamtuliper" <amt@...> wrote:
>
> Does anyone have an example of creating a new lot via code (and
> possibly then giving it a qty and setting it's cost)? I have code
that
> is creating a part automatically, now I need to fill in the rest of
the
> details.
> Thanks!
> Adam
>
In hindsight - I was quite new to the api and after a little fiddling
around got it right.
How I mentioned in earlier posting to do it was wrong -
so instead I created this method:

Private Sub CreateNewPartLot(ByVal partNum As String, ByVal
lotNumber As String)
Dim partAdapt As Epicor.Mfg.UI.Adapters.PartAdapter

Try
partAdapt = New Epicor.Mfg.UI.Adapters.PartAdapter
(PartForm)
partAdapt.BOConnect()
partAdapt.GetById(partNum)
partAdapt.GetNewPartLot(partNum)
Dim newRowIndex As Integer = partAdapt.PartData.Tables
("PartLot").Rows.Count() - 1
Dim partLot As DataRow = partAdapt.PartData.Tables
("PartLot").Rows(newRowIndex)
partLot("LotNum") = lotNumber '<LotNum>TestLot</LotNum>
'part("PartLotDescription") =
description '<PartLotDescription>TestLotDescription</PartLotDescriptio
n>
partAdapt.Update()
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
partAdapt.Dispose()
End Try

End Sub



--- In vantage@yahoogroups.com, "adamtuliper" <amt@...> wrote:
>
> completed this, but populating a lot and assigning cost is the
tricky
> part. For anyone else, I:
> (in the part form)
>
> 1. load up a part using GetById
> 2. create a new partlot data row
> 3. fill in values
> 4. save object
> so:
>
> Dim partAdapt As PartAdapter = New PartAdapter(PartForm)
> partAdapt.BOConnect()
> partAdapt.GetByID(partNum)
>
> Dim dr As DataRow = partAdapt.PartData.Tables("PartLot").NewRow()
> SetLotValues(dr, "your new part number goes here", "Test Lot")
> partAdapt.PartData.Tables("PartLot").Rows.Add(dr)
> partAdapt.Update()
>
> Private Sub SetLotValues(dr as DataRow, partNum as String, lotNum
as
> string)
> dr("Company") = "YOUR COMPANY ID HERE AS SET IN COMPANY CONFIG"
> dr("PartNum") = partNum
> dr("LotNum") = lotNum
> dr("PartLotDescription") = ""
> dr("OnHand") = false
> dr("LotLaborCost") = 0
> dr("LotBurdenCost") = 0
> dr("LotMaterialCost") = 0
> dr("LotSubContCost") = 0
> dr("LotMtlBurCost") = 0
> dr("Character01") = ""
> dr("Character02") = ""
> dr("Character03") = ""
> dr("Character04") = ""
> dr("Character05") = ""
> dr("Character06") = ""
> dr("Character07") = ""
> dr("Character08") = ""
> dr("Character09") = ""
> dr("Character10") = ""
> dr("Number01") = 0
> dr("Number02") = 0
> dr("Number03") = 0
> dr("Number04") = 0
> dr("Number05") = 0
> dr("Number06") = 0
> dr("Number07") = 0
> dr("Number08") = 0
> dr("Number09") = 0
> dr("Number10") = 0
> dr("CheckBox01") = false
> dr("CheckBox02") = false
> dr("CheckBox03") = false
> dr("CheckBox04") = false
> dr("CheckBox05") = false
> dr("Number11") = 0
> dr("Number12") = 0
> dr("Number13") = 0
> dr("Number14") = 0
> dr("Number15") = 0
> dr("Number16") = 0
> dr("Number17") = 0
> dr("Number18") = 0
> dr("Number19") = 0
> dr("Number20") = 0
> dr("CheckBox06") = false
> dr("CheckBox07") = false
> dr("CheckBox08") = false
> dr("CheckBox09") = false
> dr("CheckBox10") = false
> dr("CheckBox11") = false
> dr("CheckBox12") = false
> dr("CheckBox13") = false
> dr("CheckBox14") = false
> dr("CheckBox15") = false
> dr("CheckBox16") = false
> dr("CheckBox17") = false
> dr("CheckBox18") = false
> dr("CheckBox19") = false
> dr("CheckBox20") = false
> dr("ShortChar01") = ""
> dr("ShortChar02") = ""
> dr("ShortChar03") = ""
> dr("ShortChar04") = ""
> dr("ShortChar05") = ""
> dr("ShortChar06") = ""
> dr("ShortChar07") = ""
> dr("ShortChar08") = ""
> dr("ShortChar09") = ""
> dr("ShortChar10") = ""
> dr("ShipDocAvail") = false
> dr("TransactionSource") = ""
> dr("ScrLotBurdenCost") = 0
> dr("ScrLotLaborCost") = 0
> dr("ScrLotMaterialCost") = 0
> dr("ScrLotMtlBurCost") = 0
> dr("ScrLotSubContCost") = 0
> dr("Plant") = ""
> dr("OnHandQty") = 0
> dr("PartNumPartDescription") = ""
> dr("PartNumTrackDimension") = false
> dr("PartNumTrackLots") = false
> dr("PartNumTrackSerialNum") = false
> dr("RowIdent") = ""
> dr("RowMod") = "A"
> End Sub
>
>
> --- In vantage@yahoogroups.com, "adamtuliper" <amt@> wrote:
> >
> > Does anyone have an example of creating a new lot via code (and
> > possibly then giving it a qty and setting it's cost)? I have code
> that
> > is creating a part automatically, now I need to fill in the rest
of
> the
> > details.
> > Thanks!
> > Adam
> >
>
Hello,



We notice that PO Suggestions are not taking into account the lead time
that is specified in PartPlant. I called tech support and they're on it.

In the mean time, I figured I would add a field to the PO Suggestions
screen that at least shows the lead time from PartPlant so that buyer
see something.



I created a foreign key view from SugPoDtl to the Part table and then a
sub-table view from my foreign key view to the PartPlant table using
Company and PartNum as the link columns.

I then added a texbox that is bound to PartPlant.LeadTime but this box
doesn't show the values in this field. In fact it shows nothing.



Am I missing a step?



Thanks,

Joe Rojas

IT Manager

TNCO, Inc.

781-447-6661 x7506

jrojas@...



[Non-text portions of this message have been removed]
Off the top of my head.... Did you supply a constant for the Plant ?

--- In vantage@yahoogroups.com, "Joe Rojas" <jrojas@...> wrote:
>
> Hello,
>
>
>
> We notice that PO Suggestions are not taking into account the lead
time
> that is specified in PartPlant. I called tech support and they're
on it.
>
> In the mean time, I figured I would add a field to the PO
Suggestions
> screen that at least shows the lead time from PartPlant so that
buyer
> see something.
>
>
>
> I created a foreign key view from SugPoDtl to the Part table and
then a
> sub-table view from my foreign key view to the PartPlant table using
> Company and PartNum as the link columns.
>
> I then added a texbox that is bound to PartPlant.LeadTime but this
box
> doesn't show the values in this field. In fact it shows nothing.
>
>
>
> Am I missing a step?
>
>
>
> Thanks,
>
> Joe Rojas
>
> IT Manager
>
> TNCO, Inc.
>
> 781-447-6661 x7506
>
> jrojas@...
>
>
>
> [Non-text portions of this message have been removed]
>
Unfortunately I don't even know what that means :-(



I noticed something weird when creating the sub-table view.

The FKV I created is called PartInfo and the STV I created off of
PartInfo is called PartPlantView.



When I go into the Data Tools window and select my STV is shows that the
"Link Columns View" as PartInfo but when I click Edit Custom View it
changes to SugPoDtl.

Also, all the columns in "Parent View Columns" are for SugPoDtl. I
wonder if this is part of my problem....



I wish there was better documentation of how to use the data tools.



Thanks,

Joe Rojas

IT Manager

TNCO, Inc.

781-447-6661 x7506

jrojas@...



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of bw2868bond
Sent: Monday, March 19, 2007 10:33 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-table
view



Off the top of my head.... Did you supply a constant for the Plant ?

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Joe
Rojas" <jrojas@...> wrote:
>
> Hello,
>
>
>
> We notice that PO Suggestions are not taking into account the lead
time
> that is specified in PartPlant. I called tech support and they're
on it.
>
> In the mean time, I figured I would add a field to the PO
Suggestions
> screen that at least shows the lead time from PartPlant so that
buyer
> see something.
>
>
>
> I created a foreign key view from SugPoDtl to the Part table and
then a
> sub-table view from my foreign key view to the PartPlant table using
> Company and PartNum as the link columns.
>
> I then added a texbox that is bound to PartPlant.LeadTime but this
box
> doesn't show the values in this field. In fact it shows nothing.
>
>
>
> Am I missing a step?
>
>
>
> Thanks,
>
> Joe Rojas
>
> IT Manager
>
> TNCO, Inc.
>
> 781-447-6661 x7506
>
> jrojas@...
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
I guess that is why there is not too much left on the top of my
head :-)

Any how, I created a FKV on SugPoDtl called Part
Column Name: SugPoDtl.PartNum
Like Column Value: Part.PartNum

Then I created a STV called PartPlant
Parent view being Part.
Sub Table Name: PartPlant
Link Columns View: Part

Parent View Columns:
Part.Company -> PartPlant.Company
Part.PartNum -> PartPlant.PartNum

I save the customization, exited and re opened. I added a text box
and gave the data source as PartPlant and field as LeadTime and it
works OK

Check to see if the views are using the same tables/links...

--- In vantage@yahoogroups.com, "Joe Rojas" <jrojas@...> wrote:
>
> Unfortunately I don't even know what that means :-(
>
>
>
> I noticed something weird when creating the sub-table view.
>
> The FKV I created is called PartInfo and the STV I created off of
> PartInfo is called PartPlantView.
>
>
>
> When I go into the Data Tools window and select my STV is shows
that the
> "Link Columns View" as PartInfo but when I click Edit Custom View it
> changes to SugPoDtl.
>
> Also, all the columns in "Parent View Columns" are for SugPoDtl. I
> wonder if this is part of my problem....
>
>
>
> I wish there was better documentation of how to use the data tools.
>
>
>
> Thanks,
>
> Joe Rojas
>
> IT Manager
>
> TNCO, Inc.
>
> 781-447-6661 x7506
>
> jrojas@...
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf
> Of bw2868bond
> Sent: Monday, March 19, 2007 10:33 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-
table
> view
>
>
>
> Off the top of my head.... Did you supply a constant for the Plant ?
>
> --- In vantage@yahoogroups.com <mailto:vantage%
40yahoogroups.com> , "Joe
> Rojas" <jrojas@> wrote:
> >
> > Hello,
> >
> >
> >
> > We notice that PO Suggestions are not taking into account the
lead
> time
> > that is specified in PartPlant. I called tech support and they're
> on it.
> >
> > In the mean time, I figured I would add a field to the PO
> Suggestions
> > screen that at least shows the lead time from PartPlant so that
> buyer
> > see something.
> >
> >
> >
> > I created a foreign key view from SugPoDtl to the Part table and
> then a
> > sub-table view from my foreign key view to the PartPlant table
using
> > Company and PartNum as the link columns.
> >
> > I then added a texbox that is bound to PartPlant.LeadTime but
this
> box
> > doesn't show the values in this field. In fact it shows nothing.
> >
> >
> >
> > Am I missing a step?
> >
> >
> >
> > Thanks,
> >
> > Joe Rojas
> >
> > IT Manager
> >
> > TNCO, Inc.
> >
> > 781-447-6661 x7506
> >
> > jrojas@
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I followed your example to the letter and still no luck.

What version are you on? I'm on 8.03.304C. I wonder if I've stumbled
across a bug...



Thanks,

Joe Rojas

IT Manager

TNCO, Inc.

781-447-6661 x7506

jrojas@...



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of bw2868bond
Sent: Monday, March 19, 2007 2:04 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-table
view



I guess that is why there is not too much left on the top of my
head :-)

Any how, I created a FKV on SugPoDtl called Part
Column Name: SugPoDtl.PartNum
Like Column Value: Part.PartNum

Then I created a STV called PartPlant
Parent view being Part.
Sub Table Name: PartPlant
Link Columns View: Part

Parent View Columns:
Part.Company -> PartPlant.Company
Part.PartNum -> PartPlant.PartNum

I save the customization, exited and re opened. I added a text box
and gave the data source as PartPlant and field as LeadTime and it
works OK

Check to see if the views are using the same tables/links...

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Joe
Rojas" <jrojas@...> wrote:
>
> Unfortunately I don't even know what that means :-(
>
>
>
> I noticed something weird when creating the sub-table view.
>
> The FKV I created is called PartInfo and the STV I created off of
> PartInfo is called PartPlantView.
>
>
>
> When I go into the Data Tools window and select my STV is shows
that the
> "Link Columns View" as PartInfo but when I click Edit Custom View it
> changes to SugPoDtl.
>
> Also, all the columns in "Parent View Columns" are for SugPoDtl. I
> wonder if this is part of my problem....
>
>
>
> I wish there was better documentation of how to use the data tools.
>
>
>
> Thanks,
>
> Joe Rojas
>
> IT Manager
>
> TNCO, Inc.
>
> 781-447-6661 x7506
>
> jrojas@...
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of bw2868bond
> Sent: Monday, March 19, 2007 10:33 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: V8 - Trying to figure out how to add a sub-
table
> view
>
>
>
> Off the top of my head.... Did you supply a constant for the Plant ?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%
40yahoogroups.com> , "Joe
> Rojas" <jrojas@> wrote:
> >
> > Hello,
> >
> >
> >
> > We notice that PO Suggestions are not taking into account the
lead
> time
> > that is specified in PartPlant. I called tech support and they're
> on it.
> >
> > In the mean time, I figured I would add a field to the PO
> Suggestions
> > screen that at least shows the lead time from PartPlant so that
> buyer
> > see something.
> >
> >
> >
> > I created a foreign key view from SugPoDtl to the Part table and
> then a
> > sub-table view from my foreign key view to the PartPlant table
using
> > Company and PartNum as the link columns.
> >
> > I then added a texbox that is bound to PartPlant.LeadTime but
this
> box
> > doesn't show the values in this field. In fact it shows nothing.
> >
> >
> >
> > Am I missing a step?
> >
> >
> >
> > Thanks,
> >
> > Joe Rojas
> >
> > IT Manager
> >
> > TNCO, Inc.
> >
> > 781-447-6661 x7506
> >
> > jrojas@
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





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