Hello,
Autogen won't add the zSource mandatory field in the insert rule if there is a field "SOURCE" in the design of the target table. It doesn't matter if the field is active or not.
More detailed info about the issue in https://support.syniti.com/hc/en-us/requests/18905.
Solution would be to rename all fields with name "SOURCE" in the system types so during import in Design the field is correctly named and won't cause an issue in autogen.
SQL to rename all source fields in system types by adding the table name:
update a
set a.field = a.field + '_' + b.tablename, a.AddedVia = 'SQL', a.HelpText = a.HelpText + ' - Original name SOURCE. Renamed to SOURCE_[table name] as it conflicts with Automation logic to add the zSource-field in the insert rule. Due to this the insert rule failed.'
from ztSystemTypeTableField a
left join ztSystemTypeTable b on a.SystemTypeTableID = b.SystemTypeTableID
where a.field like 'SOURCE'
and b.tablename not like '%/%'
Would be nice to have this integrated into DSP/stewardship platform.
It is problematic when ADM Target Design includes field called SOURCE. We'll look to address this issue in a future release. It's unlikely taht we'll modify the System Type, but possibly rename a field called SOURCE if added to a Target Table.