Entity template
The entity template allows you to create a .NET DLL that provides a customized graphical user interface for Sage CRM entities.
Creating a new .NET DLL from the entity template doesn't create a new entity table, screens, and List blocks in Sage CRM. You must do this first in the Sage CRM front end or through the Advanced Customization Wizard.
When you use the entity template to create a new C# project in Microsoft Visual Studio, the CRM .NET Entity Wizard starts. In this wizard, complete the following options, and then click GO!:
- New Entity Name. Enter the name of the entity.
- Id field. Enter the ID field name of the entity table.
- Prefix. Enter the prefix to be used for the fields in the new table.
The entity template creates the following .cs files:
- CrmBase.cs. Contains methods to call each .cs file created by the template.
- EntityDataPage.cs. Defines the screen that allows a user to view an entity in Sage CRM. The IdField and EntityName values are the ones you entered when you created your C# project from the entity template. AddEntryGroup specifies the entry group that's displayed. Its default value is EntityNameNewEntry. You can change this to whatever you've named your block in Sage CRM.
- EntityDataPageDelete.cs, EntityDataPageEdit.cs, and EntityDataPageNew.cs. Are similar to EntityDataPage.cs. They Create an instance of the specialized web class. The IdField, EntityName, and AddEntryGroup values are the ones you entered when you created your C# project from the entity template.
- EntityListPage.cs. Displays a list of entities in Sage CRM. It creates an instance of a specialized web class ListPage. The EntityName value is the one you entered when you created your C# project from the entity template. The list name and filter box name specify which screens are displayed. FilterByField and FilterByContextId allow the list to be filtered dynamically, in this case by user ID.
- EntitySearchPage.cs. Displays the search or find screen for the entity. It creates an instance of the specialized web class SearchPage.