Proxy Class Features.

To generate proxy classes for your project please see menu item #2 in the documentation here.


XrmToolkit provides the ability to generate proxy classes for each entity in CRM. More than just POCO objects, these classes provide the following benefits:

Additional Information from Proxy Classes

For string attributes you can easily see the logical name and max length:

For numeric attributes you can easily see the logical name, min, max and precision:

For optionset values, easily retrieve the display name of the value with the provided method:

Methods for retrieving related entities:

Proxy Class Settings

Before generating any proxy classes, there are several settings that you should notice which will affect the way that files are generated and refreshed. These settings can be found in the same window where you choose which proxy classes to generate on the 'Options' tab:

Metadata used during Proxy Class generation

XrmToolkit stores both entity and attribute metadata from your linked CRM Organizations. To learn more see our documentation here. You can manually refresh the metadata or the metadata is automatically refreshed when logging onto the organization depending on option #2 here. When the metadata is refreshed you can optionally choose to have any proxy classes that are linked in your solution automatically updated with any changes from the metadata.

Names used during Proxy Class generation

When generating proxy classes, you can choose to use the display name, schema name, or the logical name at both the class and property levels.

You can also optionally specify a specific naming pattern when generating the proxy class names. The default is to just use either the display name or logical name depending on the setting above. You can specify a prefix or suffix by changing the naming pattern. For example, if you wanted the class name to be [Display Name]Entity then you would specify {0}Entity as the naming pattern.