0
votes

Using the crmsvcutil against Microsoft Dynamics CRM 4.0 you could both output multiple class files to a directory (out parameter) as well as add a prefix or suffix to generated class names (classNameFormat parameter).

Unfortunately this functionality appears to have been removed with the CRM 2011 tool.

Erik Pool has written on Filtering generated entities with CrmSvcUtil, which might be the path we need to take to do the first, but I haven't found anything that could help replace classNameFormat.

Instead of going through the generated class file(s) and manually making this modification, is there any way to extend crmsvcutil to handle this during generation?

1

1 Answers

2
votes

You can achieve this without manually updating all of your generated files by creating an extension that implements the INamingService interface. The particular methods you're interested in will be GetNameForEntity and GetNameForEntitySet. For all others just delegate to the default implementation provided in the constructor.

The CRM 2011 SDK is a good place to start as there are some code samples demonstrating the extensibility.