The 1020 Column Limit
In CampusNexus CRM, the Business Administrator User can create properties for an object based on the institution’s business needs. This translates to adding a new column to an existing table or even creating a new table. In the Query Model, each property that is created in an object must have a one to one mapping with a column in the database schema. To accomplish this, a view (a virtual table that includes all normal properties of an entity) is used which includes the entity’s base and extended tables. SQL Server specifies that a maximum of 1020 columns can be included in a view. If the count exceeds 1020, the view cannot be compiled. The script that runs while upgrading CampusNexus CRM then does the following:
• Marks the predefined properties as published to OData
• Selects the remaining custom properties as published to OData
Properties that are not published to OData are inserted in the tblAdminLogs table. Information of this table can be viewed from the Admin Log node. Similarly, when a Business Administrator User creates a property for an object, depending on whether a property, tab or an object is being created, a message is displayed if the count exceeds 1020. For information about verifying the status of a property, see Viewing the Published Status of Object Properties. For information about how you can publish or unpublish properties to OData to ensure that you are within the 1020 character limit, see Publishing and Unpublishing Properties to OData.
Note
• The maximum limit of 1020 characters is applicable to an entity.
• As a best practice, when CampusNexus CRM metadata is changed, the generated contracts assembly file (Cmc.NexusCrm.Contracts.dll) must be copied from the Bin folder of Web Client to the installation path of Workflow Composer and the Bin folder of Forms Builder Renderer. Alternatively, a copying application (such as Synctoy 2.1) can also be used to automate the copying of files.
If an existing workflow includes a property that is not available in the current generated contracts, the administrator needs to manually edit the workflow and remove the property.
Enhancement in the tblColumnMain Table
When main database is upgraded to the current version, a new column, nPublish, in the tblColumnMain table is updated to the value 1 to indicate that normal properties of an object are published to OData. This occurs in the following sequence:
• Predefined properties
• Custom properties
Protected, external and related object properties are excluded.
As a maximum of 1020 properties per object can be published to OData. additional properties that exceed this count during the upgrade will not be published even if they qualify to be updated. An error is logged in the setup log to indicate that such properties will not be published.
Note
• The maximum value of 1020 properties does not apply to recordlist and relationship properties.
• The nPublish column can have one of the following values:
◦ 1 – Indicates that the property is successfully published to OData.
◦ 2 – Indicates that the property failed to be published to OData.
The default value is null.