Hello,
I have edited my post to make it easier to understand. I would appreciate some help with Kinetic Application Studio.
In classic Epicor, there is a wizard customization tool called “Add User Defined Table As Child”. It generates the code required to add a UD entry grid to any interface.
How do you do that in Kinetic Application Studio?
For example, in Part Maintenance, there is UOMs entry grid that displays the UOMs for the selected Part (PartUOM table, where foreign key1 is PartNum and foreign key2 is UOMCode). We would like to add a similar entry grid that displays the labels for the selected Part (UD02 table, where FK1 is PartNum and FK2 is LabelID).
Following is how I have tried to do it :
-
Create a new Part layer in Application Studio;
-
Create a UD02 dataview;
-
Define a parent-child relationship in the UD02 dataview, where the parent is Part.PartNum and the child is UD02.Key1.
-
Create a custom AfterGetByID event that calls Ice.BO.UD02Svc.GetRows() and fills the UD02 dataview;
-
Add a new panel card grid under Part UOMs native grid;
-
Bind (Ep Binding) the added grid to the UD02 dataview;
-
Create a GetNewUD02 event that calls Ice.BO.UD02Svc.GetaNewUD02(). Leave the ‘ds’ parameter value empty. Add a Request Parameter where the dataset system code is ‘Ice’ and the dataset ID is ‘UD02’.
When pressing the ‘+’ button, Epicor calls by default the GetNewXXXX event, where XXXX is the name of the dataview (in this case, UD02). However, no new row is added to the grid because the UD02.Key1 value has not been set to the selected PartNum. I don’t know how to set this value after getting the new record.
Following is the generated code in the classic customization that initialize the new row values after calling GetaNewUD02() method.
DataRow editRow = this._ud02Adapter.UD02Data.UD02.Rows[(rowCount - 1)];
editRow.BeginEdit();
editRow["Key1"] = partnum;
editRow.EndEdit();
Thanks for your help and have a great day