web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Auto generated code

(0) ShareShare
ReportReport
Posted on by 1,299

Hi Team,

I am working on a custom C# code that someone before me in the organisation has created to do some batch job in CRM. I see a class that has been auto created, its basically all fields and entity in CRM i guess, i am adding a new field in CRM anyway and i am sure i have to update this, but not sure how. I dont want to manually do this. Can i autogenerate this code and update it there and if yes how do i do it . Below is the first few lines of the class.

//------------------------------------------------------------------------------
// 
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// 
//------------------------------------------------------------------------------

[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()]

namespace solutions
{
	
	
	[System.Runtime.Serialization.DataContractAttribute()]
	[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9154")]
	public enum AccountState
	{
		
		[System.Runtime.Serialization.EnumMemberAttribute()]
		Active = 0,
		
		[System.Runtime.Serialization.EnumMemberAttribute()]
		Inactive = 1,
	}
	
	/// 
	/// Business that represents a customer or potential customer. The company that is billed in business transactions.
	/// 
	[System.Runtime.Serialization.DataContractAttribute()]
	[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("account")]
	[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9154")]
	public partial class Account : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	{
		
		/// 
		/// Default Constructor.
		/// 
		public Account() : 
				base(EntityLogicalName)
		{
		}

I have the same question (0)
  • Suggested answer
    Dynamics Objects 365 Profile Picture
    550 on at
    RE: Auto generated code

    Hi, I think you may use crmSvcUtil.

    docs.microsoft.com/.../create-early-bound-entity-classes-code-generation-tool

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Auto generated code

    Hello,

    This code is generated via CrmSvcUtil - docs.microsoft.com/.../create-early-bound-entity-classes-code-generation-tool

  • Suggested answer
    NatrajY Profile Picture
    3,040 on at
    RE: Auto generated code

    This is a bit of serendipity. I just published a post on how to do this dreamingincrm.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 179

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 128 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans