|Date:||Thu, 21 Jun 2018 12:50:08 -0700
I have been fighting a stubborn issue of not being able to post/unlock a
record. Finally found the problem and have been able to make a fix but
it is clumsy and I hope someone can provide an alternative.
I have a form and several tables in the datamodel. The one table (call
it tableA) at issue is not linked.
Several fields on the form are defined from tableA
I use a tc.dmAttach("TableA") to make changes to records as well as
unlocking. The problem I ran into is that after unlocking the data would
not post to the table.
I tried TableA.dmResync(tc) - did not solve the problem
I tried dmResync(TableA,tc) - did not solve the problem
I tried field.unlockRecord (using one of the defined fields)and that
worked when that field had been changed.
I then tried field.unlockRecord() for all defined fields and that
worked, as such:
What seems to happen is that if a defined field's value has been changed
then it needs a distinct unlock/post record
So, is there a way to unlock all the define fields of a single table (in
the datamodel) in one statement instead of independantly?
ps I also put a self.unLockRecord() in the :depart: method of each
defined field and that worked also, again clumsy I think.