Improvements to SCV views to support user-defined extension columns in system-defined entities

Previously the SCV synchronization process added the res_xxx column to an extension view or to a profile view only when the extension column itself is a standard column. The res_xxx column has not been added for custom extension columns in the entity.

These columns can exist in SCV entities:

  • mycolumn -> column in main table
  • xs_mycolumn -> standard extension column
  • xc_mycolumn -> custom extension column

The synchronization process has been updated to include custom extension columns in the calculation of the result columns that are added to the extension and profile views. Following logic is applicable when determining the final value of these columns for system-defined entities:

For each xs_<column_name> or xc_<column_name> in x that has a corresponding <column_name> in c, select one column as follows:

COALESCE(x.xs_<column_name>, c.<column_name>)   AS res_<column_name>        (this excludes PK columns)
        COALESCE(x.xc_<column_name>, c.<column_name>)   AS res_<column_name>        (this excludes PK columns)
        COALESCE(x.xs_<column_name>, x.xc_<column_name>, c.<column_name>)   AS res_<column_name>    (if both xs_* and xc_* columns exist; this excludes PK columns)
Note: By default, this feature is enabled. A new role or privilege is not required to access this feature.