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

Notifications

Announcements

No record found.

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

    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

    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

    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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans