Query in AR Invoice Entry

Hey All,

Hope everyone is having a good week.

We are having problems with assigning incorrect freight charges to customers with existing Fedex accounts. A UD field exists in customer maintenance to record these Fedex numbers on customer maintenance, but these aren’t visible on the invoice entry form. My goal is to display a customer’s account number on the header tab of AR Invoice Entry when one of their invoices is selected in a group.

I’ve written a test customization that pulls the Fedex number into a textbox using a dynamic query based on the customer ID located in the UltraGrid. The query runs after the GetByID method is called. It seems to be working fine up until the point when the page is refreshed and the row index of the UltraGrid is lost. At this point, Epicor throws an error indicating that no instance of an object is selected and that the row index is currently at -1.

Does anyone have a recommendation on a better way to achieve this goal? I originally attempted a customization that pulled from a dataview rather than the UltraGrid, but I had a really difficult time getting that to work. I have very little experience with Epicor, so there is a distinct possibility that I may have been using the incorrect view name.

Attached below is the relevant part of the customization. Thank you for all of your help on this.

It depends exactly what you want to happen. Is this record meant to appear ONLY when a row is selected?

If so, then the simplest fix to your code is to test whether your “TestRow” is null before the rest of the code. Personally I would probably be working with the associated EpiDataView, but the grid active row will work as long as you’re only wanting a result when there is an active row.

1 Like

great suggestion, thank you