I am able to add and call the field changed handler. This is working.
Dim ID = DirectCast(GetValueFromFieldID(e.Model, e.Field.Name, Guid.Empty), Guid)
ID is empty when written this way. Seems like we are asking for the model and field name or the field which called the subprocedure. This is the field we are watching to see if it changed. If I hard code ID to my batch row GUID or if I set my ID = Me.ActiveModel.ContextId the rest of my code executes but still does not work. I am confused as to why the suggested syntax is not firing and I am concerned I have misinterpreted what is needed. Replacing the code suggested in the documentation seems wrong, but its the only way I can get anywhere. Next, we inspect the ID to make sure its not empty (it's ok if I hard code it or call Me.ActiveModel.ContextID, otherwise this check fails, the subprocedure returns and we are done.
If ID.Equals(Guid.Empty) Then Return
We build a DataFormLoadRequest referencing the form that will (reload data to be used a few lines later. I am using the Edit Form in my batch, and assume it references the LOAD stored procedure defined within. This runs fine. It uses the ID defined above, and I am worried about that variable.Next we create a DataFormLoadReply. No problemsWe try to populate the Reply
reply = Blackbaud.AppFx.Server.DataFormLoad(request, Me.RequestContext)
This works and returns something. We get all the way to our call to:
TrySetValuesFromDFI(e.Model, reply.DataFormItem, "MYFORMFIELDNAME", "MYDATAFIELDNAME")
This executes but does not update my field. Nothing happens.I can call TrySetValueForFieldID() all day long with succes, but not TrySetValuesFromDFI.No errors, just no change to the desired field. Any suggestions?Thanks,Ernie