Yes, more complicated then needed.
I took that example from an advanced customization doc from Epicor
(below). It does work as listed in the part master.
It looks like their approach is taking a view and modifying the
database and refreshing the textbox values, rather than just entering
the
data in the textbox and letting the interface manage the rest. Maybe
I am missing something.
Your line worked perfectly.
Thanks so much,
Ross
----------
Dim recSelected As Boolean
Dim whereClause As String = String.Empty
Dim dsPart As DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans, "PartAdapter", recSelected, True, whereClause)
If (recSelected) Then
Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("ViewName"), EpiDataView)
edv.dataView(edv.Row)("Character01") = dsPart.Tables
(0).Rows(0)("PartNum")
edv.dataView(edv.Row)("Character02") = dsPart.Tables
(0).Rows(0)("PartDescription")
edv.Notify( New EpiNotifyArgs(oTrans, edv.Row,
edv.Column) )
End If
-----------
I took that example from an advanced customization doc from Epicor
(below). It does work as listed in the part master.
It looks like their approach is taking a view and modifying the
database and refreshing the textbox values, rather than just entering
the
data in the textbox and letting the interface manage the rest. Maybe
I am missing something.
Your line worked perfectly.
Thanks so much,
Ross
----------
Dim recSelected As Boolean
Dim whereClause As String = String.Empty
Dim dsPart As DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans, "PartAdapter", recSelected, True, whereClause)
If (recSelected) Then
Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("ViewName"), EpiDataView)
edv.dataView(edv.Row)("Character01") = dsPart.Tables
(0).Rows(0)("PartNum")
edv.dataView(edv.Row)("Character02") = dsPart.Tables
(0).Rows(0)("PartDescription")
edv.Notify( New EpiNotifyArgs(oTrans, edv.Row,
edv.Column) )
End If
-----------
--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> I am not sure exactly what you are trying to accomplish with this:
>
> > Dim edv As EpiDataView = CType(oTrans.EpiDataViews("Customer"),
> > EpiDataView)
> > edv.dataView(edv.Row)("Character01") = dsCustomer.Tables(0).Rows
(0)
> > ("CustID")
> > edv.Notify( New EpiNotifyArgs(oTrans, edv.Row, edv.Column) )
>
> If you have a text box that is bound to a field in the part table,
> then all you would need to do is:
>
> txtEpiCustom1.Text = dsCustomer.Tables(0).Rows(0)("CustID")
>
> bw
>
> --- In vantage@yahoogroups.com, "Ross Hughes" <ross.hughes@> wrote:
> >
> > Hello,
> >
> > I am trying to add a CustID field to the part master. I have
added
> > it and bound a Character field to the text box. That all works
> OK.
> >
> > Then I am calling the customer search box with some code. (listed
> > below). I have also added the 3 customer.dll files as custom
> > references.
> >
> > When I select the customer from the search box (in hopes of
> returning
> > the CustID), I get the following hard error:
> >
> > "Object reference not set to an instance of an object". This
seems
> > like it might be related to the Customer DataView not being
> > accessible or properly declared.
> >
> > Can anyone help?
> >
> > Thanks much,
> > Ross
> >
> > ------------------------------------
> > Private Sub btnCUSTID_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles btnCUSTID.Click
> >
> > '// ** Place Event Handling Code Here **
> >
> > Dim recSelected As Boolean
> > Dim whereClause As String = String.Empty
> > Dim dsCustomer As DataSet =
> > Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
> > (oTrans, "CustomerAdapter", recSelected, True, whereClause)
> >
> > If (recSelected) Then
> >
> > Dim edv As EpiDataView = CType(oTrans.EpiDataViews("Customer"),
> > EpiDataView)
> > edv.dataView(edv.Row)("Character01") = dsCustomer.Tables(0).Rows
(0)
> > ("CustID")
> > edv.Notify( New EpiNotifyArgs(oTrans, edv.Row, edv.Column) )
> >
> > End If
> >
> > End Sub
> >
>