Your agency can add additional fields to the system. When you add an agency field you must modify the database as well as the custom business metadata.
Note: After adding agency fields, the steps in this topic must be repeated each time your agency updates the system or the web server.
Caution: While adding agency fields, no other users should be logged on to the system.
Follow these steps to add an agency field:
Identify the entity and table where the agency field is to be added.
For the new agency field, define the field attributes (such as field name, type of field, field length, and whether the field is required).
On the database server, update the database table with the new agency field.
On the application server, create a text file that includes the parameters in the table below, separated by commas, and save it in the Agency Fields folder.
Parameter |
Description |
ModelName |
The entity to which the new field is being added. This name is case sensitive. |
Name |
The name of the field. |
StoredName |
The name of the field in the database. This name is case sensitive. |
Type |
The type of field. You can use one of these values:
|
Nullable |
Add this parameter if the field allows Nulls in the database. String types do not require this parameter; other data types may. |
For example, if you are adding a required text field with a length of 20 characters named STRING_FIELD_1 to the Project entity, you might type the following line in the file:
ModelName=Project,Name=MyStringField,StoredName=STRING_FIELD_1,Type=String(2)
On the application server, make a backup copy of the existing ModelServiceReference.dll file in the ReportHost\bin folder in your installation folder. Place the backup copy in a separate location.
On the web server, make a backup copy of the existing ModelServiceReference.dll file in the UIHost\bin folder in your installation folder. Place the backup copy in a separate location.
In the Command Prompt window, change the directory to the location of the AgencyFields folder in your installation directory and run the AFGenerator.exe program by typing the following text at the command prompt:
AFGenerator.exe (text file created in step 4 above)
Note: The Microsoft .NET Framework 4 SDK must be installed prior to running the AFGenerator.
If successful, the system displays a message to confirm that the following files were created successfully:
Repository.dll
Repository.ModelMappings.dll
Repository.Models.dll
Repository.SchemaFiles.dll
ModelServiceReference.dll
You must stop the DateTriggerService before copying the new files. To locate this service, navigate to the Administrative Tools > Services. Find the service beginning with DateTriggerService and followed by the name of the application website. This is the service you must stop. For example, if your application website name is AWProject, then stop the service named DateTriggerService_AWProject.
It is also recommended that you stop the application and UI websites. To do this, right-click the application and UI websites in IIS Manager, and choose Stop.
Note: After you finish copying and pasting the files, you must restart the appropriate services.
Copy the first four files created (Repository.dll, Repository.ModelMappings.dll, Repository.Models.dll, Repository.SchemaFiles.dll) from:
\inetpub\wwwroot\<instance>\AgencyFields\AFGenerator\DLLs
To the following locations in your installation folder (overwriting the existing files):
\ModelsHost\bin
\ProcessesAndUtils
\ProcessesHost\bin
\ReportHost\bin
\WCFHost\bin
Copy the ModelServiceReference.dll file created in Step 8 to the following locations on the application server (overwriting the existing files):
\ProcessesAndUtils
\ReportHost\bin
\UIHost\bin
After replacing the files, restart the application and UI websites via IIS Manager and restart the DateTriggerService.
To automatically set up the attributes of the new agency field, you must generate the business metadata for your system. To do this, open the Command Prompt window, change the directory to the ProcessesAndUtils directory in your installation folder, and run the following command:
GenerateInitialBusinessMetadata -All
After generating the business metadata, you can modify the label, location, and default values for the new agency field on the Business Metadata Summary component. For more information, see Editing the Business Metadata.
You can customize other aspects of the field, such as where it is located on a component, on the Component Overview. For more information, see Customizing Components.
Setting Custom Field Default Values