Instead of using a UD table and having to build interfaces to maintain it decent, I am attempting to use a UDCode list. I am trying to employee the same technique as provided. I keep getting an invalid query error. How does this look?
Public Sub GetCityStateFromZip(zipCode As String)
Dim zipLocated As Boolean
Dim zipWhere As String = "CodeDesc = '" & zipCode & "' and CodeTypeID='ZipCodes'"
Dim dsUDCodes As DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,"UserCodesAdapter",zipLocated,False,zipWhere)
If(zipLocated) Then
'MessageBox.Show(dsUDCodes.Tables(0).Rows(0)("LongDesc"))
MessageBox.Show("test")
End If
End Sub
Public Sub GetCityStateFromZip(zipCode As String)
Dim zipLocated As Boolean
Dim zipWhere As String = "CodeDesc = '" & zipCode & "' and CodeTypeID='ZipCodes'"
Dim dsUDCodes As DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,"UserCodesAdapter",zipLocated,False,zipWhere)
If(zipLocated) Then
'MessageBox.Show(dsUDCodes.Tables(0).Rows(0)("LongDesc"))
MessageBox.Show("test")
End If
End Sub
--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> In a Customization
>
> bool recSelected=false;
> String zip=edvCustomer.dataView[edvCustomer.Row]["ZipCode"].ToString();
> String whereClause = "Key1='"+zip+"'";
> DataSet ud04Search
> =Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,
> "UD04Adapter", out recSelected, false, whereClause);
> if(recSelected)
> use data
> else
> warn..
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *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, Nov 3, 2011 at 9:33 AM, jgiese1988
> <jgiese@...>wrote:
>
> > **
> >
> >
> > Here is the scenario: I would like to have a table full of zip codes with
> > city, state, municipality, primary zip, lon, and lat (I have the data for
> > this from some web applications I have developed). Below is logic I would
> > use for this lookup.
> >
> > On the CustomerEntry screen
> > -AfterFieldChange of zip code
> > -Look-up the entered value in the UD table containing zip code information
> > -If no row is returned alert 'Invalid zip code'
> > -else set the City and State fields equal to the values of the returned
> > row.
> >
> > I know how to do an after field change and set the city state fields with
> > a value. I do this same thing right now but using a web service (Yahoo Maps
> > API) but within Epicor it is much too slow. Any input on how I would
> > perform the search and return?
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>