I'm trying to find out if there is a way in which you can check whether the popup opened from a ComplexTableField is on editing/viewing (magnyfing glass icon or notebook icon being clicked) or adding mode (add new DataObject button).
The DataObject created is associated with the current admin user logged in only when creating a new DataObject. When editing, the member must be selectable through a dropdown (of course, viewing will just show the Member as readonly).
What I need in my DataObject is something like this:
Ok, after posting I realize that I only need to check if the MemberID on the current DataObject is present, that will mean that is editing or viewing. Zero or not present will mean that is adding a new DataObject. So the above code will be: