Global Change Tables
GlobalChangeCatalog
The XML within a GlobalChangeSpec defines a global change definition. The GlobalChangeCatalog table contains the metadata for the GlobalChangeSpec definitions. When the GlobalChangeSpec is loaded into the system via LoadSpec.exe or the catalog browser, the XML spec file is digested and placed into this table. The following is a summary of some of the key columns within this table:
Table Column | Description |
---|---|
GLOBALCHANGESSPECXML | The GLOBALCHANGESSPECXML holds the global change spec as an xml document. |
DISPLAYNAME | A unique index resides on the DISPLAYNAME column. Therefore, provide a display name for your global change that will not interfere with future upgrades. A common practice for custom third-party global changes is to suffix the display name with "(Custom)" or "(<customer side id>)." See Best Practices, 7 Commandments of Infinity Development, and Commandment 6: Unique Name on Spec for more details. |
FORMMETADATAXML | The FORMMETADATAXML column holds the XML for the user interface form fields used to define the parameters passed into the global change. |
GlobalChange
A global change instance defines what you want changed where. To create an instance, click Add on the Global Changes page. Select the appropriate global change definition and parameters. The parameters are defined within the ParametersFormMetaData element of the GlobalChangeSpec. After you create an instance, it is saved in the GlobalChange table.
Tip: For more information on how to create and manage global change instances, see Global Change within the Blackbaud CRM Administration Guide.
The following is a summary of some of the key columns within this table:
Table Column | Description |
---|---|
GLOBALCHANGECATALOGID | The GLOBALCHANGECATALOGID column is used as a foreign key to the GLOBALCHANGECATALOG table. The value in this column originates from the GLOBALCHANGESPEC's ID attribute value. |
LASTRUNON |
The LASTRUNON column used to store the last date and time the global change instance is run. When the instance is first created, this column is NULL. LASTRUNON is populated when the first global change instance is started. When a global change instance is started, the system will pass the LASTRUNON value into the @ASOF parameter within a SP based global change. The software developer has the option to leverage the value of @ASOF within the logic of the global change definition to narrow the list of records processed. For example, the @ASOF value could be used within a SQL SELECT WHERE Clause to compare against a table's DATACHANGED column to see if any activity has taken place within the table since the last @ASOF date. You can reset the LASTRUNON date by selecting the instance in the Global Changes grid and clicking Reset last run on date. Within a CLR based Global Change, the "AsOf" value can be obtained from the base class from which your CLR class must inherit (Blackbaud.AppFx.Server.AppCatalog.AppGlobalChangeProcess ). Ex:
|
GLOBALCHANGEDATAFORMITEM |
The GLOBALCHANGEDATAFORMITEM column stores the parameter values (form field values) defined when the instance was configured by the end user. |
GlobalChangeStatus
After you create or edit a global change instance, defining specifically what you want changed and where, you must process the instance. This executes the change, updating all selected records. When you start a global change instance, a row is created within the GlobalChangeStatus table. The 'Global Change Process' Business Process is utilized by the system to run a Global Change instance. The GlobalChangeStatus table joins the GlobalChange instance row to a BusinessProcessStatus row. In this way the status of an instance is tracked within the database. The following is a summary of some of the key columns within this table:
Table Column | Description |
---|---|
ID | The 'Global Change Process' Business Process is utilized by the system to run a Global Change instance. The GlobalChangeStatus.ID column is used to provide a primary key for the table and used to support a foreign key to the BusinessProcessStatus table. |
ParameterSetID | The GlobalChangeStatus.ParameterSetID column is used to support a foreign key to the GlobalChange table's ID column. The GlobalChangeStatus table joins the GlobalChange instance row to a BusinessProcessStatus row. |
BusinessProcessStatus
BusinessProcessStatus contains information pertaining to the business process status information. Each time a Global Change is run, a row is added into the BusinessProcessStatus table. For details, see Business Processes ERD. A business process named 'Global Change Process' is used by the system to run the Global Change. The NumberProcessed column represents the number of records successfully processed, including those records added, edited, and deleted by the Global Change. Use the StartedOn and EndedOn columns to determine the data and time the business process instance/Global Change instance was started and ended. The NumberProcessed and NumberOfExceptions columns are displayed on the user interface status screen for a given Global Change instance run.
GlobalChangeRecordCount
Each time a global change instance is run, a row is added into the GLOBALCHANGTERECORDCOUNT table. When creating an SP global change, the developer should define parameters within the stored procedure to indicate to the system the number of records added, edited, and deleted by the global change instance run:
@NUMBERADDED int = 0 output,
@NUMBEREDITED int = 0 output,
@NUMBERDELETED int = 0 output,
When creating a CLR global change, the developer will override the ProcessGlobalChange() function that returns an object of type AppGlobalChangeResult. Use AppGlobalChangeResult to indicate the number of records added, edited, and deleted by the global change instance run.
The number of records added, edited, and deleted are not displayed within the user interface.
Table Column | Description |
---|---|
ID | The primary key of the table. Also used as a foreign key to BUSINESSPROCESSSTATUS and GLOBLACHANGESTATUS tables. |
NUMBERADDED | The number of records added. |
NUMBEREDITED | The number of records edited. |
NUMBERDELETED | The number of records deleted. |