Issue on generate child row at UD109A

Dear all kindly need your advice since I am very newbie here. I tried find solution but no luck. I need to create module that auto generate child based on parent table reference in UD109A with this code.

UD109Adapter adapterUD109 = new UD109Adapter(this.oTrans);

string parentKey1 = "TestPK1";
string parentKey2 = string.Empty;
string parentKey3 = string.Empty;
string parentKey4 = string.Empty;
string parentKey5 = string.Empty;

bool result = adapterUD109.GetaNewUD109A(parentKey1, parentKey2, parentKey3, parentKey4, parentKey5);

int rowCount =adapterUD109.UD109Data.UD109A.Rows.Count;

DataRow edvUD109ARow = adapterUD109.UD109Data.UD109A.Rows[(rowCount-1)];

edvUD109ARow["Company"] = "EPIC06";
edvUD109ARow["Key1"] = parentKey1;
edvUD109ARow["Key2"] = parentKey2;
edvUD109ARow["Key3"] = parentKey3;
edvUD109ARow["Key4"] = parentKey4;
edvUD109ARow["Key5"] = parentKey5;
edvUD109ARow["ChildKey1"] = "PartNum";
edvUD109ARow["ChildKey2"] = "JobNum";
edvUD109ARow["ChildKey3"] = "ASM";
edvUD109ARow["ChildKey4"] = string.Empty;
edvUD109ARow["ChildKey5"] = string.Empty;
edvUD109ARow["RowIdent"] = "A";





// Cleanup Adapter Reference

But the compile status keep say that

Error: CS1061 - line 1389 (2599) - ‘Ice.Adapters.UD109Adapter’ does not contain a definition for ‘GetaNewUD109A’ and no extension method ‘GetaNewUD109A’ accepting a first argument of type ‘Ice.Adapters.UD109Adapter’ could be found (are you missing a using directive or an assembly reference?)

kindly need your advice for this. Thanks.

This line should likely be:

edvUD109ARow["RowMod"] = "A";

Or not at all needed.

However, this would be better in a Method Directive BPM instead. Use Pre-Processing to see if it is an added row, then use Post-Processing to create the record. Finally, in Post Processing, refresh the results dataset so it shows on the screen.

Can’t see anything wrong except what @Jason_Woods mentioned. Not sure you need the 2 AcceptChanges, I think the Update you have there is enough. It is a little weird as there is definitely a method GetaNewUD109A in UD109 but it doesn’t seem to find it. I know it’s a long shot, but did you check the references in your customization, do you have the UD109 added there? Especially if you’re calling this from another form than UD109 Entry.

LE: make sure you have references to Ice.Adapters.UD109 and Ice.Contracts.BO.UD109. Also, I don’t think you need to set the RowMod, GetaNew will do that for you (not tested so I’m not sure 100%).

Thank you so much, working for me.

Thank you so much