Unfortunately, the VS extension throws errors when I open this customization.
It thinks “this.Results_Column” doesn’t exist. However, I can continue what I have been doing and just debug using visual studio through Epicor.
Anyway I digress. Below screenshot is from the results view of args.Row.Table.Columns. If I’m reading this correctly, we know from this that JobHead_JobFirm is Row index 15:
Taking a look at args.Row at index 15, we can see that it is in fact a boolean
I also added a line to print out the type of args.Row[“JobHead_JobFirm”] just in case I had misunderstood what I was seeing in debugger:
Added line
MessageBox.Show(args.Row["JobHead_JobFirm"].GetType().ToString());
To the Results_BeforeFieldChange event where the error is originating from:
private void Results_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
{
// ** Argument Properties and Uses **
// args.Row["FieldName"]
// args.Column, args.ProposedValue, args.Row
// Add Event Handler Code
switch (args.Column.ColumnName)
{
case "JobHead_JobReleased":
if ((bool)args.ProposedValue == true)
{
MessageBox.Show(args.Row["JobHead_JobFirm"].GetType().ToString());
args.Row["JobHead_JobFirm"] = true;
}
break;
}
}
Sure enough - Boolean