Add User Defined Table as Child Error

I have a customization over the Part Form in which I create a UD07 Publisher DataView.

//UD07 - Make DataView for Publishing
	private void UD07PublisherView()
	{
	DataTable dt = new DataTable();
	dt.Columns.Add(new DataColumn("Key1",typeof(string)));
	dt.Columns.Add(new DataColumn("Key2",typeof(string)));
	dt.Columns.Add(new DataColumn("Key3",typeof(string)));
	dt.Columns.Add(new DataColumn("Key4",typeof(string)));
	dt.Columns.Add(new DataColumn("Key5",typeof(string)));
	dt.Columns.Add(new DataColumn("SysRowID",typeof(Guid)));
	var r = dt.NewRow();
	dt.Rows.Add(r);
	EpiDataView edvMyCustomUD07View = new EpiDataView();
	edvMyCustomUD07View.dataView = dt.DefaultView;
	oTrans.Add("MyCustomUD07View",edvMyCustomUD07View);
	}

I am trying to add the UD07 as a child table to this view. I used the Wizard to Add a User Defined Table as a child to that Publisher DataView. Once the wizard adds all the code, I am getting an error when I try to compile.

.
Do I need to add something in my code somewhere?

The wizard should generate that code correctly. Have you saved it and reopened the customization? Otherwise I would open the base form and re-run the wizard to see what it did different.

Dear @skearney,

I have used the UD02 table as child table in Product Group. First delete the customization & follow the below mentioned steps

  1. Enable the Developer Mode.
  2. Open the Part Entry form
  3. Go to Tools -> Customizations
  4. Customization Window will popup
  5. Go to Tools -> Wizards -> Customization Wizard
  6. Select Add User Defined Table as Child option & click Launch Wizard
  7. UD table Add/Edit/Delete Functionality window will popup
  8. Select Data View:Part & UD Adapters: UD07Adapter
  9. Click on Next
  10. New window will popup & add the Parent & Child Table relationship
  11. Select Field: PartNum
  12. Select UD Key Fields: Key1 & click on Add .
  13. Click on Finish Button.
  14. Go to Tools -> Test Code