Proxy Classes

To generate proxy classes for your project please see the documentation here.

Features:

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

  • Proxy Classes can be automatically refreshed or manually refreshed from CRM with the click of a single button.
  • Track changes so that when a record is updated only the changes are pushed to CRM. This greatly reduces the noise created in the audit logs by properties that do not change.
  • Provide additional information regarding the properties while coding
    • 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 are provided to easily retrieve related entities (both 1:N and N:N):

  • Allow CRM constraints on attributes to be handled without any coding:
    • Auto truncate strings if they are longer than the max length
    • Automatically adjust numeric values to their min or max if the value falls outside the bounds
    • These can be adjusted on a per-entity basis
  • Many methods are provided for performing common CRM tasks:

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 classed to generate. The first settings can be found on the 'Options' tab:

  1. CRM Solution Manager 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 number 3 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.

  2. When generating proxy classes, you can choose to use the display names, or the logical names 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.

When CRM Solution Manager generates the proxy classes, you can specify where the files should be saved on the 'File Paths' tab:

This setting is copied from the global settings here.