I am passing a DataView to Epicor Function as an input parameter using rest-erp widget.
In Function type of input parameter is set to DataSet.
Now I need to copy DataRow to UD17Row.
I was trying to use BufferCopy.Copy as usually but it doesn’t work. Nothing is copied.
UD17Tableset inUD17ts = new UD17Tableset();
foreach (DataRow dr in inDS.Tables["UD17"].Rows)
{
UD17Row rUD17 = new UD17Row();
inUD17ts.UD17.Add(rUD17);
BufferCopy.Copy<DataRow, UD17Row>(dr, rUD17);
}
I was also trying to use CopyDataTableToTSTable but the output was exactly the same. Nothing was copied.
Anyone succeed with copying from DataSet to TableSet using BufferCopy.Copy or CopyDataTableToTSTable?
I found a workaround. It’s not a solution.
Because I was sending a Dataview based on UD17 Dataset, I changed a DataType in Function input parameter from DataSet to UD17Tableset.
With this change I avoided conversion from DataSet to Tableset (DataRow to UD17Row).
I added an output string variable to Function. I am filling variable with data from copied row. When my function is executed I can see value from variable in browser. All columns were empty…