Remco wrote:
Hi Frans,
I checked the things you wrote and this is the outcome:
The property is declared "overloaded".
The value "BFieldIndex.Revision_AEntity" in fields stays 0 and is not updated.
I use the latest version of the runtime. downloaded it yesterday
Some things are changed in our code now and we use the fields property to set values. I understand in that way we need to find all fields that have "revision" in the name. We undid the inheritance and now are going to solve it in another way.
Friday-itis hits again... I of course meant override, not overload.
So the property for the Revision field in B should be defined as an override of the property in A. If that's not the case, the field isn't marked as an overriding field and it then isn't 'linked'. This means that in B, you have both A and B's fields in the Fields object. If a field is overriden, they're linked together, so if you set B's value, the value of A's version is also set and vice versa. This makes both values to be set without a problem.
So as the field of A isn't set in an instance of B when you set the revision, they don't seem to be linked. I'll setup a testcase here to see if I can reproduce it.
I also would recommend to avoid setting field values through the Fields object, but use SetNewFieldValue() on the entity.