I was trying to add a custom column when calling Labor.GetRows post processing method directive. Then code below compiles and I get no error when the method is called, but the column is not in the resulting data. Is there a way to achieve what I am attempting here, or is this never going to work?
foreach (var row in result.LaborDtl)
var jobHead = Db.JobHead.FirstOrDefault(r => r.Company == row.Company && r.JobNum == row.JobNum);
if (jobHead != null)
var project = Db.Project.FirstOrDefault(r => r.Company == jobHead.Company && r.ProjectID == jobHead.ProjectID);
if (project != null)
row["ProjectDesc"] = project.Description;
You can’t do it this way unfortunately.
There is a Merge between the server dataset and the client dataset where this will get lost. You have a few options, replace the grid with a custom BAQView Grid (see other posts about it)
Or you could do a simple Foreign Key lookup and add the field via a customization. Or you could add the UD fields to the LaborDtl table in the Extended UD (as an actual UD field) then populate it as you are doing.