Force Initialization of BPMData

Is there a quick way to initialize the BPMData from a BPM without explicitly setting each field in clientContextBPMData?
I was hoping I could call a BO or something to initialize/clear out the clientContextBPMData table in between BPM calls since the data is hanging around from the last BPM Form usage.

You’d have to do it in code, I think.

foreach (var column in callContextBpmData.Table.Columns)
{
    callContextBpmData[column.ColumnName] = null;
}

You might have to add an if clause or case for the data types (e.g. set char fields to “” instead of null) if it gets angry when you try the above loop as-is.

EDIT: You could also try callContextBpmData.Table.Clear() followed by Table.NewRow(). No idea how the system would handle that. I’ve never used more than like…4 fields in a single form, and I dispose of values when I’m done with them.

1 Like