Is there a way to tell if a TXDataWebDataset has changes that haven't been applied? I have code that triggers on AfterApplyUpdates, but if I call ApplyUpdates and there is no data waiting to be sent to the server then the AfterApplyUpdates Event is not triggered.
I have tried if not Dataset.Modified then but that always seems to return true even if I have previously applied updates.
Isn't this a sign that you can check if there are pending changes?
Why do you need the AfterApplyUpdates event to be triggered when there are no pending changes?
In any case, you can use method GetPendingUpdates to get a list of pending changes, if the array is not empty, then the dataset has modifications.
I have code that fires on the AfterApplyUpdates on other datasets. I don't mind calling the code from elsewhere but need to ascertain whether the ApplyUpdates will be triggered - sort of like this:
If Dataset.Modified then
Dataset.ApplyUpdates
else
ExecuteCodeCalledFromAfterApplyUpdates;
Looking at the source code I thought the Modified would do the trick, but it doesn't seem to, but GetPendingUpdates does