I’m trying to set the value of a custom Control using an Event. I haven’t had much luck with how to do this.
So I have a grid which is filled with data loaded from a BAQ. When the user changes the selected row within the grid, I would like a separate text box to be populated with another value from the BAQ.
In the older versions where I could use C# this was a simple matter. Now I’m’ not too sure where to even start! A bit of a learning curve this Kinetics is!
Can’t yo just bind the textbox to the same data view active row?
I was thinking that, but the BAQ is a join with the Vendor table and a UD04 table. We use for special comments. So the UD table holds:
- Key1 - VendorNum
- Key2 - An Increment (to prevent duplicate error)
- Date01 - Date the comment was added
- Character01 - The comment
The table displays other data + the comment date. On row change, the textbox just updates with the Character01 field.
In this situation, would your advice still be applicable?
Yes I would “never” have unbound fields.
Are you familiar with Memo Entry? It’s available on multiple objects, including Supplier. It allows the user to add comments within separate categories. It tracks the user, date, and time the comment was added.
And since it’s designed for this kind of use, it may be easier to bring the data in than a UD Table and a BAQ. Just a thought.
Hmmm thanks for this Mark! I’ll have a chat with the powers that be to see if we can change our processes!
It seems like there’s a lot of built in features that we just don’t use haha!
@J_I, you can try the following:
- Create a new data view and bind it to your BAQ.
- Add a grid (panel card grid) to a page and in its provider model, map it to the same BAQ.
- Additionally, set the grid’s Ep Binding to your new data view ID.
- In the grid, map your columns to the BAQ display fields you want to see in the grid.
- Bind your text box to the Character01 column.
At runtime, the grid gets its data from the BAQ, then the grid’s current row data populates your view and your text box. The Using Grids in Application Studio course on Epicor learning Center goes through a similar process - Exercise 2, steps 1-2.
I’ve managed to load the BAQ Data View into my grid but all I get is a locked/greyed out grid? ‘Locked’ as in I can’t collapse the panel card or click on anything. Seems to be stuck loading? I’ve made sure to limit the results from the BAQ to the currently loaded Supplier so there is only one result in the grid.
Also when I bind the text box to the Data View, nothing ever shows in the text field.
Managed to figure this out. I was using the incorrect EpBinding in the properties! Why they have up to 3 different EpBindings I do not know.