It isn't actually valid to use the Parent reference in a DataPortal_XYZ method when the parent is an ERLB. The reason is because it would fail with a remote data portal. The ERLB doesn't transfer to the server in that case - only the root object being saved moves to the server, and so any parent reference would be referencing the ERLB back on the client.
I suppose I should offer an alternative solution though
I recommend that you change your code to do any sort of parent-related checks in a Save() override.
And if your DataPortal_Update() method needs some parent information (or sibling information) then in your Save() override needs to copy that data into some temporary state store inside the root object that's being saved.
RockfordLhotka:It isn't actually valid to use the Parent reference in a DataPortal_XYZ method when the parent is an ERLB. The reason is because it would fail with a remote data portal.
Copyright (c) Marimer LLC