Here’s what I hope will be an easy one for the programmers out there…
I’ve written a simple customization for the UD100 table (and ud100a child) where a button creates a “new ticket” via oTrans.GetNew(). That’s fine enough, I can populate the key fields etc. and create new records.
My challenge is, after the GetNew (but before that new record is committed to the DB), the user can elect to retrieve an existing ticket using a couple text boxes etc. I then use a GetByID() to retrieve that record.
It all essentially works fine but…
- The system maintains a list of all the newly created records in the Navigation bar. This is not desire, but okay.
- When I delete one of the child records for the current record, Epicor performs the updates, but drops back to the first record in the list.
I can get back to the most recently added record easily enough via the navigation bar, but it’s as though the system loses track of the current record.
When I run a trace, I can see my activity all the way through updating my last record, and then the system does a ClearData, a ResetList, and a GetByID for the first record – thereby changing my current record.
So that’s weird, but my question is… Is there a way to set the CurrentDataRow? Or do I need to run a particular oTrans method to cause it to forget all but the last record I created (preferred)?
Thanks in advance
Update1: I just noticed that, at the top of the customized page; in the navigation bar, the first record I created is always displayed. As though the system doesn’t consider any new records as the "current record". I think that’s why, whenever “it” refreshes, that first record is the one that is displayed.*
Update2: Well this is embarrassing… it seems the application maintains an EpiDataView called ListView. That object is a list of my records and it appears to be the binding source for the Nav bar.
So… I’m guessing I have to manage that thing somehow - I would have thought it’d track along with my UD100 EpiDataView as far as current record. Apparently not.
Any best practice out there for synchronizing the movement through the list and the UD table? Strange that I would have to do that.