CampusNexus CRM Events
The following events are specific to CampusNexus CRM.
-
Saving events are triggered just prior to data being saved.
-
Saved events are triggered just after data is saved
-
Deleting events are triggered just prior to data being deleted.
-
Deleted events are triggered just after data is saved
These events apply to all operational objects except the Account object.
Note: In the current release, the Prospect object is renamed to Lead.
Cmc.NexusCrm.Contracts.dll
All operational and reference objects are wrapped in the assembly file Cmc.NexusCrm.Contracts.dll. Whenever new properties are created in CampusNexus CRM or an existing property definition (metadata) is changed, this assembly is regenerated. Workflows for CampusNexus CRM require the events and objects contained in the Cmc.NexusCrm.Contracts.dll to be available in Workflow Composer.
To regenerate the assembly after any metadata changes, perform the following steps:
-
On the IIS Server of the Web Client for CampusNexus CRM, restart the Cmc.Crm.Workspaces application.
-
Navigate to the URL of the Web Client for CampusNexus CRM.
-
Copy the regenerated Cmc.NexusCrm.Contracts.dll from the \bin folder of the Web Client to the installation path of Workflow Composer.
CampusNexus CRM Namespaces
Entities of operational objects will be available under this contract in the following namespaces:
-
Cmc.NexusCrm.Common.Entities
-
Cmc.NexusCrm.Enrollment.Entities
-
Cmc.NexusCrm.Events.Entities
The following figure is an example of a namespace:
The following table indicates the list of objects supported in the above namespaces:
Limitations:
-
For the Event object, only the Get operation is supported.
-
For the Participant object, only the Get and Update operations are supported.
-
For all other objects, the Get, Create, and Update operations are supported.
-
The Delete operation is not supported in all objects listed in the table.
-
For external properties in all objects, only the Get activity is supported.
Deleting Events
Deleting events are triggered just before records are deleted. These events are used in scenarios where a user or an administrator needs to be notified prior to the deletion of a record.
For the handler written in .NET code to raise a validation, the second parameter, EventArgs, must be type casted to ValidationEventArgs.
Example for the Lead entity:
eventService.GetEvent<DeletingEvent>().RegisterHandler<Lead>(((lead, args) =>
{
var msg = (ValidationEventArgs) args;
msg.ValidationMessages.Add("Not a valid ID");
}
));