Application Studio - Add User Defined Table As Child

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.
image

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 :

  1. Create a new Part layer in Application Studio;

  2. Create a UD02 dataview;

  3. Define a parent-child relationship in the UD02 dataview, where the parent is Part.PartNum and the child is UD02.Key1.

  4. Create a custom AfterGetByID event that calls Ice.BO.UD02Svc.GetRows() and fills the UD02 dataview;

  5. Add a new panel card grid under Part UOMs native grid;

  6. Bind (Ep Binding) the added grid to the UD02 dataview;

  7. 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 :slight_smile:

I used a updateable BAQ to solve this. I set up the BAQ to subscribe to the screen records, then followed Hannah’s instructions on updatable BAQs.
For my new records I called an Epicor Function with the appropriate keys and refresh the BAQ.

That is good to know. As a workaround, I also used an Epicor Function for new records.

For anyone interested, I created a Kinetic Idea about this Wizard - Add User Defined Table As Child | Epicor Kinetic Ideas (aha.io)

It may be a dead topic, but I just want to help others.