From 4460d79a863ca3e217cb23ac4a70821df542f625 Mon Sep 17 00:00:00 2001 From: Betim Beja <11160171+BetimBeja@users.noreply.github.com> Date: Tue, 19 Apr 2022 06:40:33 +0200 Subject: [PATCH 1/3] :bug: Fixed duplicate key exception with Early-Bound entities --- .../XrmEntitySerializer.Core.Tests.csproj | 2 +- .../XrmEntitySerializer.Core.csproj | 114 +- XrmEntitySerializer.Tests/EarlyBound/Model.cs | 2945 +++++++++++++++++ XrmEntitySerializer.Tests/EntityTests.cs | 39 + .../XrmEntitySerializer.Tests.projitems | 1 + .../AttributeCollectionConverter.cs | 11 +- 6 files changed, 3054 insertions(+), 58 deletions(-) create mode 100644 XrmEntitySerializer.Tests/EarlyBound/Model.cs diff --git a/XrmEntitySerializer.Core.Tests/XrmEntitySerializer.Core.Tests.csproj b/XrmEntitySerializer.Core.Tests/XrmEntitySerializer.Core.Tests.csproj index 88c93e7..eb73e23 100644 --- a/XrmEntitySerializer.Core.Tests/XrmEntitySerializer.Core.Tests.csproj +++ b/XrmEntitySerializer.Core.Tests/XrmEntitySerializer.Core.Tests.csproj @@ -9,7 +9,7 @@ Properties XrmEntitySerializer.Tests XrmEntitySerializer.Core.Tests - netcoreapp3.0;netcoreapp3.1;net5.0 + netcoreapp3.1;net5.0;net6.0 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 diff --git a/XrmEntitySerializer.Core/XrmEntitySerializer.Core.csproj b/XrmEntitySerializer.Core/XrmEntitySerializer.Core.csproj index 8940d6e..7763d90 100644 --- a/XrmEntitySerializer.Core/XrmEntitySerializer.Core.csproj +++ b/XrmEntitySerializer.Core/XrmEntitySerializer.Core.csproj @@ -1,59 +1,61 @@  - - - - false - Debug - AnyCPU - {49DD871D-D743-4600-9537-4D2BBD4747E1} - XrmEntitySerializer.Core - XrmEntitySerializer.Core - $(PackageVersion)-Alpha - netcoreapp3.0;netcoreapp3.1;net5.0 - 512 - true - - - true - full - false - bin\Debug\ - TRACE;DEBUG;XRM_9 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;XRM_9 - prompt - 4 - - - $(DefineConstants);NETCORE; - - - $(DefineConstants);NETCORE; - - - $(DefineConstants);NETCORE; - - - - - - - - - - - - - - - - - + + + + false + Debug + AnyCPU + {49DD871D-D743-4600-9537-4D2BBD4747E1} + XrmEntitySerializer.Core + XrmEntitySerializer.Core + $(PackageVersion)-Alpha + netcoreapp3.1;net5.0;net6.0 + 512 + true + + + true + full + false + bin\Debug\ + TRACE;DEBUG;XRM_9 + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE;XRM_9 + prompt + 4 + + + + $(DefineConstants);NETCORE; + + + $(DefineConstants);NETCORE; + + + $(DefineConstants);NETCORE; + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XrmEntitySerializer.Tests/EarlyBound/Model.cs b/XrmEntitySerializer.Tests/EarlyBound/Model.cs new file mode 100644 index 0000000..911b03a --- /dev/null +++ b/XrmEntitySerializer.Tests/EarlyBound/Model.cs @@ -0,0 +1,2945 @@ +//------------------------------------------------------------------------------ +// +// 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 AlbanianXrm.EarlyBound +{ + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "8.0.1.7297")] + 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", "8.0.1.7297")] + public partial class Account : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged + { + + /// + /// Default Constructor. + /// + public Account() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "account"; + + public const int EntityTypeCode = 1; + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + + private void OnPropertyChanged(string propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + private void OnPropertyChanging(string propertyName) + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, new System.ComponentModel.PropertyChangingEventArgs(propertyName)); + } + } + + /// + /// Select a category to indicate whether the customer account is standard or preferred. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountcategorycode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountCategoryCode + { + get + { + return this.GetAttributeValue("accountcategorycode"); + } + set + { + this.OnPropertyChanging("AccountCategoryCode"); + this.SetAttributeValue("accountcategorycode", value); + this.OnPropertyChanged("AccountCategoryCode"); + } + } + + /// + /// Select a classification code to indicate the potential value of the customer account based on the projected return on investment, cooperation level, sales cycle length or other criteria. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountclassificationcode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountClassificationCode + { + get + { + return this.GetAttributeValue("accountclassificationcode"); + } + set + { + this.OnPropertyChanging("AccountClassificationCode"); + this.SetAttributeValue("accountclassificationcode", value); + this.OnPropertyChanged("AccountClassificationCode"); + } + } + + /// + /// Unique identifier of the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public System.Nullable AccountId + { + get + { + return this.GetAttributeValue>("accountid"); + } + set + { + this.OnPropertyChanging("AccountId"); + this.SetAttributeValue("accountid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("AccountId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.AccountId = value; + } + } + + /// + /// Type an ID number or code for the account to quickly search and identify the account in system views. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountnumber")] + public string AccountNumber + { + get + { + return this.GetAttributeValue("accountnumber"); + } + set + { + this.OnPropertyChanging("AccountNumber"); + this.SetAttributeValue("accountnumber", value); + this.OnPropertyChanged("AccountNumber"); + } + } + + /// + /// Select a rating to indicate the value of the customer account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountratingcode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountRatingCode + { + get + { + return this.GetAttributeValue("accountratingcode"); + } + set + { + this.OnPropertyChanging("AccountRatingCode"); + this.SetAttributeValue("accountratingcode", value); + this.OnPropertyChanged("AccountRatingCode"); + } + } + + /// + /// Unique identifier for address 1. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_addressid")] + public System.Nullable Address1_AddressId + { + get + { + return this.GetAttributeValue>("address1_addressid"); + } + set + { + this.OnPropertyChanging("Address1_AddressId"); + this.SetAttributeValue("address1_addressid", value); + this.OnPropertyChanged("Address1_AddressId"); + } + } + + /// + /// Select the primary address type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_addresstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_AddressTypeCode + { + get + { + return this.GetAttributeValue("address1_addresstypecode"); + } + set + { + this.OnPropertyChanging("Address1_AddressTypeCode"); + this.SetAttributeValue("address1_addresstypecode", value); + this.OnPropertyChanged("Address1_AddressTypeCode"); + } + } + + /// + /// Type the city for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_city")] + public string Address1_City + { + get + { + return this.GetAttributeValue("address1_city"); + } + set + { + this.OnPropertyChanging("Address1_City"); + this.SetAttributeValue("address1_city", value); + this.OnPropertyChanged("Address1_City"); + } + } + + /// + /// Shows the complete primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_composite")] + public string Address1_Composite + { + get + { + return this.GetAttributeValue("address1_composite"); + } + } + + /// + /// Type the country or region for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_country")] + public string Address1_Country + { + get + { + return this.GetAttributeValue("address1_country"); + } + set + { + this.OnPropertyChanging("Address1_Country"); + this.SetAttributeValue("address1_country", value); + this.OnPropertyChanged("Address1_Country"); + } + } + + /// + /// Type the county for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_county")] + public string Address1_County + { + get + { + return this.GetAttributeValue("address1_county"); + } + set + { + this.OnPropertyChanging("Address1_County"); + this.SetAttributeValue("address1_county", value); + this.OnPropertyChanged("Address1_County"); + } + } + + /// + /// Type the fax number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_fax")] + public string Address1_Fax + { + get + { + return this.GetAttributeValue("address1_fax"); + } + set + { + this.OnPropertyChanging("Address1_Fax"); + this.SetAttributeValue("address1_fax", value); + this.OnPropertyChanged("Address1_Fax"); + } + } + + /// + /// Select the freight terms for the primary address to make sure shipping orders are processed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_freighttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_FreightTermsCode + { + get + { + return this.GetAttributeValue("address1_freighttermscode"); + } + set + { + this.OnPropertyChanging("Address1_FreightTermsCode"); + this.SetAttributeValue("address1_freighttermscode", value); + this.OnPropertyChanged("Address1_FreightTermsCode"); + } + } + + /// + /// Type the latitude value for the primary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_latitude")] + public System.Nullable Address1_Latitude + { + get + { + return this.GetAttributeValue>("address1_latitude"); + } + set + { + this.OnPropertyChanging("Address1_Latitude"); + this.SetAttributeValue("address1_latitude", value); + this.OnPropertyChanged("Address1_Latitude"); + } + } + + /// + /// Type the first line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line1")] + public string Address1_Line1 + { + get + { + return this.GetAttributeValue("address1_line1"); + } + set + { + this.OnPropertyChanging("Address1_Line1"); + this.SetAttributeValue("address1_line1", value); + this.OnPropertyChanged("Address1_Line1"); + } + } + + /// + /// Type the second line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line2")] + public string Address1_Line2 + { + get + { + return this.GetAttributeValue("address1_line2"); + } + set + { + this.OnPropertyChanging("Address1_Line2"); + this.SetAttributeValue("address1_line2", value); + this.OnPropertyChanged("Address1_Line2"); + } + } + + /// + /// Type the third line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line3")] + public string Address1_Line3 + { + get + { + return this.GetAttributeValue("address1_line3"); + } + set + { + this.OnPropertyChanging("Address1_Line3"); + this.SetAttributeValue("address1_line3", value); + this.OnPropertyChanged("Address1_Line3"); + } + } + + /// + /// Type the longitude value for the primary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_longitude")] + public System.Nullable Address1_Longitude + { + get + { + return this.GetAttributeValue>("address1_longitude"); + } + set + { + this.OnPropertyChanging("Address1_Longitude"); + this.SetAttributeValue("address1_longitude", value); + this.OnPropertyChanged("Address1_Longitude"); + } + } + + /// + /// Type a descriptive name for the primary address, such as Corporate Headquarters. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_name")] + public string Address1_Name + { + get + { + return this.GetAttributeValue("address1_name"); + } + set + { + this.OnPropertyChanging("Address1_Name"); + this.SetAttributeValue("address1_name", value); + this.OnPropertyChanged("Address1_Name"); + } + } + + /// + /// Type the ZIP Code or postal code for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_postalcode")] + public string Address1_PostalCode + { + get + { + return this.GetAttributeValue("address1_postalcode"); + } + set + { + this.OnPropertyChanging("Address1_PostalCode"); + this.SetAttributeValue("address1_postalcode", value); + this.OnPropertyChanged("Address1_PostalCode"); + } + } + + /// + /// Type the post office box number of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_postofficebox")] + public string Address1_PostOfficeBox + { + get + { + return this.GetAttributeValue("address1_postofficebox"); + } + set + { + this.OnPropertyChanging("Address1_PostOfficeBox"); + this.SetAttributeValue("address1_postofficebox", value); + this.OnPropertyChanged("Address1_PostOfficeBox"); + } + } + + /// + /// Type the name of the main contact at the account's primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_primarycontactname")] + public string Address1_PrimaryContactName + { + get + { + return this.GetAttributeValue("address1_primarycontactname"); + } + set + { + this.OnPropertyChanging("Address1_PrimaryContactName"); + this.SetAttributeValue("address1_primarycontactname", value); + this.OnPropertyChanged("Address1_PrimaryContactName"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_ShippingMethodCode + { + get + { + return this.GetAttributeValue("address1_shippingmethodcode"); + } + set + { + this.OnPropertyChanging("Address1_ShippingMethodCode"); + this.SetAttributeValue("address1_shippingmethodcode", value); + this.OnPropertyChanged("Address1_ShippingMethodCode"); + } + } + + /// + /// Type the state or province of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_stateorprovince")] + public string Address1_StateOrProvince + { + get + { + return this.GetAttributeValue("address1_stateorprovince"); + } + set + { + this.OnPropertyChanging("Address1_StateOrProvince"); + this.SetAttributeValue("address1_stateorprovince", value); + this.OnPropertyChanged("Address1_StateOrProvince"); + } + } + + /// + /// Type the main phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone1")] + public string Address1_Telephone1 + { + get + { + return this.GetAttributeValue("address1_telephone1"); + } + set + { + this.OnPropertyChanging("Address1_Telephone1"); + this.SetAttributeValue("address1_telephone1", value); + this.OnPropertyChanged("Address1_Telephone1"); + } + } + + /// + /// Type a second phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone2")] + public string Address1_Telephone2 + { + get + { + return this.GetAttributeValue("address1_telephone2"); + } + set + { + this.OnPropertyChanging("Address1_Telephone2"); + this.SetAttributeValue("address1_telephone2", value); + this.OnPropertyChanged("Address1_Telephone2"); + } + } + + /// + /// Type a third phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone3")] + public string Address1_Telephone3 + { + get + { + return this.GetAttributeValue("address1_telephone3"); + } + set + { + this.OnPropertyChanging("Address1_Telephone3"); + this.SetAttributeValue("address1_telephone3", value); + this.OnPropertyChanged("Address1_Telephone3"); + } + } + + /// + /// Type the UPS zone of the primary address to make sure shipping charges are calculated correctly and deliveries are made promptly, if shipped by UPS. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_upszone")] + public string Address1_UPSZone + { + get + { + return this.GetAttributeValue("address1_upszone"); + } + set + { + this.OnPropertyChanging("Address1_UPSZone"); + this.SetAttributeValue("address1_upszone", value); + this.OnPropertyChanged("Address1_UPSZone"); + } + } + + /// + /// Select the time zone, or UTC offset, for this address so that other people can reference it when they contact someone at this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_utcoffset")] + public System.Nullable Address1_UTCOffset + { + get + { + return this.GetAttributeValue>("address1_utcoffset"); + } + set + { + this.OnPropertyChanging("Address1_UTCOffset"); + this.SetAttributeValue("address1_utcoffset", value); + this.OnPropertyChanged("Address1_UTCOffset"); + } + } + + /// + /// Unique identifier for address 2. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_addressid")] + public System.Nullable Address2_AddressId + { + get + { + return this.GetAttributeValue>("address2_addressid"); + } + set + { + this.OnPropertyChanging("Address2_AddressId"); + this.SetAttributeValue("address2_addressid", value); + this.OnPropertyChanged("Address2_AddressId"); + } + } + + /// + /// Select the secondary address type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_addresstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_AddressTypeCode + { + get + { + return this.GetAttributeValue("address2_addresstypecode"); + } + set + { + this.OnPropertyChanging("Address2_AddressTypeCode"); + this.SetAttributeValue("address2_addresstypecode", value); + this.OnPropertyChanged("Address2_AddressTypeCode"); + } + } + + /// + /// Type the city for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_city")] + public string Address2_City + { + get + { + return this.GetAttributeValue("address2_city"); + } + set + { + this.OnPropertyChanging("Address2_City"); + this.SetAttributeValue("address2_city", value); + this.OnPropertyChanged("Address2_City"); + } + } + + /// + /// Shows the complete secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_composite")] + public string Address2_Composite + { + get + { + return this.GetAttributeValue("address2_composite"); + } + } + + /// + /// Type the country or region for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_country")] + public string Address2_Country + { + get + { + return this.GetAttributeValue("address2_country"); + } + set + { + this.OnPropertyChanging("Address2_Country"); + this.SetAttributeValue("address2_country", value); + this.OnPropertyChanged("Address2_Country"); + } + } + + /// + /// Type the county for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_county")] + public string Address2_County + { + get + { + return this.GetAttributeValue("address2_county"); + } + set + { + this.OnPropertyChanging("Address2_County"); + this.SetAttributeValue("address2_county", value); + this.OnPropertyChanged("Address2_County"); + } + } + + /// + /// Type the fax number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_fax")] + public string Address2_Fax + { + get + { + return this.GetAttributeValue("address2_fax"); + } + set + { + this.OnPropertyChanging("Address2_Fax"); + this.SetAttributeValue("address2_fax", value); + this.OnPropertyChanged("Address2_Fax"); + } + } + + /// + /// Select the freight terms for the secondary address to make sure shipping orders are processed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_freighttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_FreightTermsCode + { + get + { + return this.GetAttributeValue("address2_freighttermscode"); + } + set + { + this.OnPropertyChanging("Address2_FreightTermsCode"); + this.SetAttributeValue("address2_freighttermscode", value); + this.OnPropertyChanged("Address2_FreightTermsCode"); + } + } + + /// + /// Type the latitude value for the secondary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_latitude")] + public System.Nullable Address2_Latitude + { + get + { + return this.GetAttributeValue>("address2_latitude"); + } + set + { + this.OnPropertyChanging("Address2_Latitude"); + this.SetAttributeValue("address2_latitude", value); + this.OnPropertyChanged("Address2_Latitude"); + } + } + + /// + /// Type the first line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line1")] + public string Address2_Line1 + { + get + { + return this.GetAttributeValue("address2_line1"); + } + set + { + this.OnPropertyChanging("Address2_Line1"); + this.SetAttributeValue("address2_line1", value); + this.OnPropertyChanged("Address2_Line1"); + } + } + + /// + /// Type the second line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line2")] + public string Address2_Line2 + { + get + { + return this.GetAttributeValue("address2_line2"); + } + set + { + this.OnPropertyChanging("Address2_Line2"); + this.SetAttributeValue("address2_line2", value); + this.OnPropertyChanged("Address2_Line2"); + } + } + + /// + /// Type the third line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line3")] + public string Address2_Line3 + { + get + { + return this.GetAttributeValue("address2_line3"); + } + set + { + this.OnPropertyChanging("Address2_Line3"); + this.SetAttributeValue("address2_line3", value); + this.OnPropertyChanged("Address2_Line3"); + } + } + + /// + /// Type the longitude value for the secondary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_longitude")] + public System.Nullable Address2_Longitude + { + get + { + return this.GetAttributeValue>("address2_longitude"); + } + set + { + this.OnPropertyChanging("Address2_Longitude"); + this.SetAttributeValue("address2_longitude", value); + this.OnPropertyChanged("Address2_Longitude"); + } + } + + /// + /// Type a descriptive name for the secondary address, such as Corporate Headquarters. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_name")] + public string Address2_Name + { + get + { + return this.GetAttributeValue("address2_name"); + } + set + { + this.OnPropertyChanging("Address2_Name"); + this.SetAttributeValue("address2_name", value); + this.OnPropertyChanged("Address2_Name"); + } + } + + /// + /// Type the ZIP Code or postal code for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_postalcode")] + public string Address2_PostalCode + { + get + { + return this.GetAttributeValue("address2_postalcode"); + } + set + { + this.OnPropertyChanging("Address2_PostalCode"); + this.SetAttributeValue("address2_postalcode", value); + this.OnPropertyChanged("Address2_PostalCode"); + } + } + + /// + /// Type the post office box number of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_postofficebox")] + public string Address2_PostOfficeBox + { + get + { + return this.GetAttributeValue("address2_postofficebox"); + } + set + { + this.OnPropertyChanging("Address2_PostOfficeBox"); + this.SetAttributeValue("address2_postofficebox", value); + this.OnPropertyChanged("Address2_PostOfficeBox"); + } + } + + /// + /// Type the name of the main contact at the account's secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_primarycontactname")] + public string Address2_PrimaryContactName + { + get + { + return this.GetAttributeValue("address2_primarycontactname"); + } + set + { + this.OnPropertyChanging("Address2_PrimaryContactName"); + this.SetAttributeValue("address2_primarycontactname", value); + this.OnPropertyChanged("Address2_PrimaryContactName"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_ShippingMethodCode + { + get + { + return this.GetAttributeValue("address2_shippingmethodcode"); + } + set + { + this.OnPropertyChanging("Address2_ShippingMethodCode"); + this.SetAttributeValue("address2_shippingmethodcode", value); + this.OnPropertyChanged("Address2_ShippingMethodCode"); + } + } + + /// + /// Type the state or province of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_stateorprovince")] + public string Address2_StateOrProvince + { + get + { + return this.GetAttributeValue("address2_stateorprovince"); + } + set + { + this.OnPropertyChanging("Address2_StateOrProvince"); + this.SetAttributeValue("address2_stateorprovince", value); + this.OnPropertyChanged("Address2_StateOrProvince"); + } + } + + /// + /// Type the main phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone1")] + public string Address2_Telephone1 + { + get + { + return this.GetAttributeValue("address2_telephone1"); + } + set + { + this.OnPropertyChanging("Address2_Telephone1"); + this.SetAttributeValue("address2_telephone1", value); + this.OnPropertyChanged("Address2_Telephone1"); + } + } + + /// + /// Type a second phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone2")] + public string Address2_Telephone2 + { + get + { + return this.GetAttributeValue("address2_telephone2"); + } + set + { + this.OnPropertyChanging("Address2_Telephone2"); + this.SetAttributeValue("address2_telephone2", value); + this.OnPropertyChanged("Address2_Telephone2"); + } + } + + /// + /// Type a third phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone3")] + public string Address2_Telephone3 + { + get + { + return this.GetAttributeValue("address2_telephone3"); + } + set + { + this.OnPropertyChanging("Address2_Telephone3"); + this.SetAttributeValue("address2_telephone3", value); + this.OnPropertyChanged("Address2_Telephone3"); + } + } + + /// + /// Type the UPS zone of the secondary address to make sure shipping charges are calculated correctly and deliveries are made promptly, if shipped by UPS. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_upszone")] + public string Address2_UPSZone + { + get + { + return this.GetAttributeValue("address2_upszone"); + } + set + { + this.OnPropertyChanging("Address2_UPSZone"); + this.SetAttributeValue("address2_upszone", value); + this.OnPropertyChanged("Address2_UPSZone"); + } + } + + /// + /// Select the time zone, or UTC offset, for this address so that other people can reference it when they contact someone at this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_utcoffset")] + public System.Nullable Address2_UTCOffset + { + get + { + return this.GetAttributeValue>("address2_utcoffset"); + } + set + { + this.OnPropertyChanging("Address2_UTCOffset"); + this.SetAttributeValue("address2_utcoffset", value); + this.OnPropertyChanged("Address2_UTCOffset"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging30")] + public Microsoft.Xrm.Sdk.Money Aging30 + { + get + { + return this.GetAttributeValue("aging30"); + } + } + + /// + /// The base currency equivalent of the aging 30 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging30_base")] + public Microsoft.Xrm.Sdk.Money Aging30_Base + { + get + { + return this.GetAttributeValue("aging30_base"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging60")] + public Microsoft.Xrm.Sdk.Money Aging60 + { + get + { + return this.GetAttributeValue("aging60"); + } + } + + /// + /// The base currency equivalent of the aging 60 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging60_base")] + public Microsoft.Xrm.Sdk.Money Aging60_Base + { + get + { + return this.GetAttributeValue("aging60_base"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging90")] + public Microsoft.Xrm.Sdk.Money Aging90 + { + get + { + return this.GetAttributeValue("aging90"); + } + } + + /// + /// The base currency equivalent of the aging 90 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging90_base")] + public Microsoft.Xrm.Sdk.Money Aging90_Base + { + get + { + return this.GetAttributeValue("aging90_base"); + } + } + + /// + /// Als Rijksoverheid staat aangevinkt zal bij het accorderen van een factuur een UBL bestand (E-factuur) worden aangemaakt en als attachment bij de factuur worden toegevoegd. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("as_rijksoverheid")] + public System.Nullable as_Rijksoverheid + { + get + { + return this.GetAttributeValue>("as_rijksoverheid"); + } + set + { + this.OnPropertyChanging("as_Rijksoverheid"); + this.SetAttributeValue("as_rijksoverheid", value); + this.OnPropertyChanged("as_Rijksoverheid"); + } + } + + /// + /// Select the legal designation or other business type of the account for contracts or reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("businesstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue BusinessTypeCode + { + get + { + return this.GetAttributeValue("businesstypecode"); + } + set + { + this.OnPropertyChanging("BusinessTypeCode"); + this.SetAttributeValue("businesstypecode", value); + this.OnPropertyChanged("BusinessTypeCode"); + } + } + + /// + /// Shows who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")] + public Microsoft.Xrm.Sdk.EntityReference CreatedBy + { + get + { + return this.GetAttributeValue("createdby"); + } + } + + /// + /// Shows the external party who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdbyexternalparty")] + public Microsoft.Xrm.Sdk.EntityReference CreatedByExternalParty + { + get + { + return this.GetAttributeValue("createdbyexternalparty"); + } + } + + /// + /// Shows the date and time when the record was created. The date and time are displayed in the time zone selected in Microsoft Dynamics 365 options. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdon")] + public System.Nullable CreatedOn + { + get + { + return this.GetAttributeValue>("createdon"); + } + } + + /// + /// Shows who created the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference CreatedOnBehalfBy + { + get + { + return this.GetAttributeValue("createdonbehalfby"); + } + } + + /// + /// Type the credit limit of the account. This is a useful reference when you address invoice and accounting issues with the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditlimit")] + public Microsoft.Xrm.Sdk.Money CreditLimit + { + get + { + return this.GetAttributeValue("creditlimit"); + } + set + { + this.OnPropertyChanging("CreditLimit"); + this.SetAttributeValue("creditlimit", value); + this.OnPropertyChanged("CreditLimit"); + } + } + + /// + /// Shows the credit limit converted to the system's default base currency for reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditlimit_base")] + public Microsoft.Xrm.Sdk.Money CreditLimit_Base + { + get + { + return this.GetAttributeValue("creditlimit_base"); + } + } + + /// + /// Select whether the credit for the account is on hold. This is a useful reference while addressing the invoice and accounting issues with the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditonhold")] + public System.Nullable CreditOnHold + { + get + { + return this.GetAttributeValue>("creditonhold"); + } + set + { + this.OnPropertyChanging("CreditOnHold"); + this.SetAttributeValue("creditonhold", value); + this.OnPropertyChanged("CreditOnHold"); + } + } + + /// + /// Select the size category or range of the account for segmentation and reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customersizecode")] + public Microsoft.Xrm.Sdk.OptionSetValue CustomerSizeCode + { + get + { + return this.GetAttributeValue("customersizecode"); + } + set + { + this.OnPropertyChanging("CustomerSizeCode"); + this.SetAttributeValue("customersizecode", value); + this.OnPropertyChanged("CustomerSizeCode"); + } + } + + /// + /// Select the category that best describes the relationship between the account and your organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customertypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue CustomerTypeCode + { + get + { + return this.GetAttributeValue("customertypecode"); + } + set + { + this.OnPropertyChanging("CustomerTypeCode"); + this.SetAttributeValue("customertypecode", value); + this.OnPropertyChanged("CustomerTypeCode"); + } + } + + /// + /// Choose the default price list associated with the account to make sure the correct product prices for this customer are applied in sales opportunities, quotes, and orders. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("defaultpricelevelid")] + public Microsoft.Xrm.Sdk.EntityReference DefaultPriceLevelId + { + get + { + return this.GetAttributeValue("defaultpricelevelid"); + } + set + { + this.OnPropertyChanging("DefaultPriceLevelId"); + this.SetAttributeValue("defaultpricelevelid", value); + this.OnPropertyChanged("DefaultPriceLevelId"); + } + } + + /// + /// Type additional information to describe the account, such as an excerpt from the company's website. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("description")] + public string Description + { + get + { + return this.GetAttributeValue("description"); + } + set + { + this.OnPropertyChanging("Description"); + this.SetAttributeValue("description", value); + this.OnPropertyChanged("Description"); + } + } + + /// + /// Select whether the account allows bulk email sent through campaigns. If Do Not Allow is selected, the account can be added to marketing lists, but is excluded from email. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotbulkemail")] + public System.Nullable DoNotBulkEMail + { + get + { + return this.GetAttributeValue>("donotbulkemail"); + } + set + { + this.OnPropertyChanging("DoNotBulkEMail"); + this.SetAttributeValue("donotbulkemail", value); + this.OnPropertyChanged("DoNotBulkEMail"); + } + } + + /// + /// Select whether the account allows bulk postal mail sent through marketing campaigns or quick campaigns. If Do Not Allow is selected, the account can be added to marketing lists, but will be excluded from the postal mail. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotbulkpostalmail")] + public System.Nullable DoNotBulkPostalMail + { + get + { + return this.GetAttributeValue>("donotbulkpostalmail"); + } + set + { + this.OnPropertyChanging("DoNotBulkPostalMail"); + this.SetAttributeValue("donotbulkpostalmail", value); + this.OnPropertyChanged("DoNotBulkPostalMail"); + } + } + + /// + /// Select whether the account allows direct email sent from Microsoft Dynamics 365. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotemail")] + public System.Nullable DoNotEMail + { + get + { + return this.GetAttributeValue>("donotemail"); + } + set + { + this.OnPropertyChanging("DoNotEMail"); + this.SetAttributeValue("donotemail", value); + this.OnPropertyChanged("DoNotEMail"); + } + } + + /// + /// Select whether the account allows faxes. If Do Not Allow is selected, the account will be excluded from fax activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotfax")] + public System.Nullable DoNotFax + { + get + { + return this.GetAttributeValue>("donotfax"); + } + set + { + this.OnPropertyChanging("DoNotFax"); + this.SetAttributeValue("donotfax", value); + this.OnPropertyChanged("DoNotFax"); + } + } + + /// + /// Select whether the account allows phone calls. If Do Not Allow is selected, the account will be excluded from phone call activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotphone")] + public System.Nullable DoNotPhone + { + get + { + return this.GetAttributeValue>("donotphone"); + } + set + { + this.OnPropertyChanging("DoNotPhone"); + this.SetAttributeValue("donotphone", value); + this.OnPropertyChanged("DoNotPhone"); + } + } + + /// + /// Select whether the account allows direct mail. If Do Not Allow is selected, the account will be excluded from letter activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotpostalmail")] + public System.Nullable DoNotPostalMail + { + get + { + return this.GetAttributeValue>("donotpostalmail"); + } + set + { + this.OnPropertyChanging("DoNotPostalMail"); + this.SetAttributeValue("donotpostalmail", value); + this.OnPropertyChanged("DoNotPostalMail"); + } + } + + /// + /// Select whether the account accepts marketing materials, such as brochures or catalogs. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotsendmm")] + public System.Nullable DoNotSendMM + { + get + { + return this.GetAttributeValue>("donotsendmm"); + } + set + { + this.OnPropertyChanging("DoNotSendMM"); + this.SetAttributeValue("donotsendmm", value); + this.OnPropertyChanged("DoNotSendMM"); + } + } + + /// + /// Type the primary email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress1")] + public string EMailAddress1 + { + get + { + return this.GetAttributeValue("emailaddress1"); + } + set + { + this.OnPropertyChanging("EMailAddress1"); + this.SetAttributeValue("emailaddress1", value); + this.OnPropertyChanged("EMailAddress1"); + } + } + + /// + /// Type the secondary email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress2")] + public string EMailAddress2 + { + get + { + return this.GetAttributeValue("emailaddress2"); + } + set + { + this.OnPropertyChanging("EMailAddress2"); + this.SetAttributeValue("emailaddress2", value); + this.OnPropertyChanged("EMailAddress2"); + } + } + + /// + /// Type an alternate email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress3")] + public string EMailAddress3 + { + get + { + return this.GetAttributeValue("emailaddress3"); + } + set + { + this.OnPropertyChanging("EMailAddress3"); + this.SetAttributeValue("emailaddress3", value); + this.OnPropertyChanged("EMailAddress3"); + } + } + + /// + /// Shows the default image for the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage")] + public byte[] EntityImage + { + get + { + return this.GetAttributeValue("entityimage"); + } + set + { + this.OnPropertyChanging("EntityImage"); + this.SetAttributeValue("entityimage", value); + this.OnPropertyChanged("EntityImage"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage_timestamp")] + public System.Nullable EntityImage_Timestamp + { + get + { + return this.GetAttributeValue>("entityimage_timestamp"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage_url")] + public string EntityImage_URL + { + get + { + return this.GetAttributeValue("entityimage_url"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimageid")] + public System.Nullable EntityImageId + { + get + { + return this.GetAttributeValue>("entityimageid"); + } + } + + /// + /// Shows the conversion rate of the record's currency. The exchange rate is used to convert all money fields in the record from the local currency to the system's default currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("exchangerate")] + public System.Nullable ExchangeRate + { + get + { + return this.GetAttributeValue>("exchangerate"); + } + } + + /// + /// Type the fax number for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("fax")] + public string Fax + { + get + { + return this.GetAttributeValue("fax"); + } + set + { + this.OnPropertyChanging("Fax"); + this.SetAttributeValue("fax", value); + this.OnPropertyChanged("Fax"); + } + } + + /// + /// Information about whether to allow following email activity like opens, attachment views and link clicks for emails sent to the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("followemail")] + public System.Nullable FollowEmail + { + get + { + return this.GetAttributeValue>("followemail"); + } + set + { + this.OnPropertyChanging("FollowEmail"); + this.SetAttributeValue("followemail", value); + this.OnPropertyChanged("FollowEmail"); + } + } + + /// + /// Type the URL for the account's FTP site to enable users to access data and share documents. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ftpsiteurl")] + public string FtpSiteURL + { + get + { + return this.GetAttributeValue("ftpsiteurl"); + } + set + { + this.OnPropertyChanging("FtpSiteURL"); + this.SetAttributeValue("ftpsiteurl", value); + this.OnPropertyChanged("FtpSiteURL"); + } + } + + /// + /// Unique identifier of the data import or data migration that created this record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("importsequencenumber")] + public System.Nullable ImportSequenceNumber + { + get + { + return this.GetAttributeValue>("importsequencenumber"); + } + set + { + this.OnPropertyChanging("ImportSequenceNumber"); + this.SetAttributeValue("importsequencenumber", value); + this.OnPropertyChanged("ImportSequenceNumber"); + } + } + + /// + /// Select the account's primary industry for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("industrycode")] + public Microsoft.Xrm.Sdk.OptionSetValue IndustryCode + { + get + { + return this.GetAttributeValue("industrycode"); + } + set + { + this.OnPropertyChanging("IndustryCode"); + this.SetAttributeValue("industrycode", value); + this.OnPropertyChanged("IndustryCode"); + } + } + + /// + /// Contains the date and time stamp of the last on hold time. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("lastonholdtime")] + public System.Nullable LastOnHoldTime + { + get + { + return this.GetAttributeValue>("lastonholdtime"); + } + set + { + this.OnPropertyChanging("LastOnHoldTime"); + this.SetAttributeValue("lastonholdtime", value); + this.OnPropertyChanged("LastOnHoldTime"); + } + } + + /// + /// Shows the date when the account was last included in a marketing campaign or quick campaign. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("lastusedincampaign")] + public System.Nullable LastUsedInCampaign + { + get + { + return this.GetAttributeValue>("lastusedincampaign"); + } + set + { + this.OnPropertyChanging("LastUsedInCampaign"); + this.SetAttributeValue("lastusedincampaign", value); + this.OnPropertyChanged("LastUsedInCampaign"); + } + } + + /// + /// Type the market capitalization of the account to identify the company's equity, used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("marketcap")] + public Microsoft.Xrm.Sdk.Money MarketCap + { + get + { + return this.GetAttributeValue("marketcap"); + } + set + { + this.OnPropertyChanging("MarketCap"); + this.SetAttributeValue("marketcap", value); + this.OnPropertyChanged("MarketCap"); + } + } + + /// + /// Shows the market capitalization converted to the system's default base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("marketcap_base")] + public Microsoft.Xrm.Sdk.Money MarketCap_Base + { + get + { + return this.GetAttributeValue("marketcap_base"); + } + } + + /// + /// Whether is only for marketing + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("marketingonly")] + public System.Nullable MarketingOnly + { + get + { + return this.GetAttributeValue>("marketingonly"); + } + set + { + this.OnPropertyChanging("MarketingOnly"); + this.SetAttributeValue("marketingonly", value); + this.OnPropertyChanged("MarketingOnly"); + } + } + + /// + /// Shows the master account that the account was merged with. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + public Microsoft.Xrm.Sdk.EntityReference MasterId + { + get + { + return this.GetAttributeValue("masterid"); + } + } + + /// + /// Shows whether the account has been merged with another account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("merged")] + public System.Nullable Merged + { + get + { + return this.GetAttributeValue>("merged"); + } + } + + /// + /// Shows who last updated the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedBy + { + get + { + return this.GetAttributeValue("modifiedby"); + } + } + + /// + /// Shows the external party who modified the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedbyexternalparty")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedByExternalParty + { + get + { + return this.GetAttributeValue("modifiedbyexternalparty"); + } + } + + /// + /// Shows the date and time when the record was last updated. The date and time are displayed in the time zone selected in Microsoft Dynamics 365 options. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedon")] + public System.Nullable ModifiedOn + { + get + { + return this.GetAttributeValue>("modifiedon"); + } + } + + /// + /// Shows who created the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedOnBehalfBy + { + get + { + return this.GetAttributeValue("modifiedonbehalfby"); + } + } + + /// + /// Type the company or business name. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("name")] + public string Name + { + get + { + return this.GetAttributeValue("name"); + } + set + { + this.OnPropertyChanging("Name"); + this.SetAttributeValue("name", value); + this.OnPropertyChanged("Name"); + } + } + + /// + /// Type the number of employees that work at the account for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("numberofemployees")] + public System.Nullable NumberOfEmployees + { + get + { + return this.GetAttributeValue>("numberofemployees"); + } + set + { + this.OnPropertyChanging("NumberOfEmployees"); + this.SetAttributeValue("numberofemployees", value); + this.OnPropertyChanged("NumberOfEmployees"); + } + } + + /// + /// Shows how long, in minutes, that the record was on hold. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("onholdtime")] + public System.Nullable OnHoldTime + { + get + { + return this.GetAttributeValue>("onholdtime"); + } + } + + /// + /// Number of open opportunities against an account and its child accounts. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("opendeals")] + public System.Nullable OpenDeals + { + get + { + return this.GetAttributeValue>("opendeals"); + } + } + + /// + /// The date time for Open Deals. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("opendeals_date")] + public System.Nullable OpenDeals_Date + { + get + { + return this.GetAttributeValue>("opendeals_date"); + } + } + + /// + /// State of Open Deals. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("opendeals_state")] + public System.Nullable OpenDeals_State + { + get + { + return this.GetAttributeValue>("opendeals_state"); + } + } + + /// + /// Sum of open revenue against an account and its child accounts. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("openrevenue")] + public Microsoft.Xrm.Sdk.Money OpenRevenue + { + get + { + return this.GetAttributeValue("openrevenue"); + } + } + + /// + /// Sum of open revenue against an account and its child accounts. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("openrevenue_base")] + public Microsoft.Xrm.Sdk.Money OpenRevenue_Base + { + get + { + return this.GetAttributeValue("openrevenue_base"); + } + } + + /// + /// The date time for Open Revenue. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("openrevenue_date")] + public System.Nullable OpenRevenue_Date + { + get + { + return this.GetAttributeValue>("openrevenue_date"); + } + } + + /// + /// State of Open Revenue. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("openrevenue_state")] + public System.Nullable OpenRevenue_State + { + get + { + return this.GetAttributeValue>("openrevenue_state"); + } + } + + /// + /// Shows the lead that the account was created from if the account was created by converting a lead in Microsoft Dynamics 365. This is used to relate the account to data on the originating lead for use in reporting and analytics. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("originatingleadid")] + public Microsoft.Xrm.Sdk.EntityReference OriginatingLeadId + { + get + { + return this.GetAttributeValue("originatingleadid"); + } + set + { + this.OnPropertyChanging("OriginatingLeadId"); + this.SetAttributeValue("originatingleadid", value); + this.OnPropertyChanged("OriginatingLeadId"); + } + } + + /// + /// Date and time that the record was migrated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("overriddencreatedon")] + public System.Nullable OverriddenCreatedOn + { + get + { + return this.GetAttributeValue>("overriddencreatedon"); + } + set + { + this.OnPropertyChanging("OverriddenCreatedOn"); + this.SetAttributeValue("overriddencreatedon", value); + this.OnPropertyChanged("OverriddenCreatedOn"); + } + } + + /// + /// Enter the user or team who is assigned to manage the record. This field is updated every time the record is assigned to a different user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownerid")] + public Microsoft.Xrm.Sdk.EntityReference OwnerId + { + get + { + return this.GetAttributeValue("ownerid"); + } + set + { + this.OnPropertyChanging("OwnerId"); + this.SetAttributeValue("ownerid", value); + this.OnPropertyChanged("OwnerId"); + } + } + + /// + /// Select the account's ownership structure, such as public or private. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownershipcode")] + public Microsoft.Xrm.Sdk.OptionSetValue OwnershipCode + { + get + { + return this.GetAttributeValue("ownershipcode"); + } + set + { + this.OnPropertyChanging("OwnershipCode"); + this.SetAttributeValue("ownershipcode", value); + this.OnPropertyChanged("OwnershipCode"); + } + } + + /// + /// Shows the business unit that the record owner belongs to. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference OwningBusinessUnit + { + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the team who owns the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + public Microsoft.Xrm.Sdk.EntityReference OwningTeam + { + get + { + return this.GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier of the user who owns the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference OwningUser + { + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Choose the parent account associated with this account to show parent and child businesses in reporting and analytics. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentaccountid")] + public Microsoft.Xrm.Sdk.EntityReference ParentAccountId + { + get + { + return this.GetAttributeValue("parentaccountid"); + } + set + { + this.OnPropertyChanging("ParentAccountId"); + this.SetAttributeValue("parentaccountid", value); + this.OnPropertyChanged("ParentAccountId"); + } + } + + /// + /// For system use only. Legacy Microsoft Dynamics CRM 3.0 workflow data. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("participatesinworkflow")] + public System.Nullable ParticipatesInWorkflow + { + get + { + return this.GetAttributeValue>("participatesinworkflow"); + } + set + { + this.OnPropertyChanging("ParticipatesInWorkflow"); + this.SetAttributeValue("participatesinworkflow", value); + this.OnPropertyChanged("ParticipatesInWorkflow"); + } + } + + /// + /// Select the payment terms to indicate when the customer needs to pay the total amount. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("paymenttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue PaymentTermsCode + { + get + { + return this.GetAttributeValue("paymenttermscode"); + } + set + { + this.OnPropertyChanging("PaymentTermsCode"); + this.SetAttributeValue("paymenttermscode", value); + this.OnPropertyChanged("PaymentTermsCode"); + } + } + + /// + /// Select the preferred day of the week for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmentdaycode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredAppointmentDayCode + { + get + { + return this.GetAttributeValue("preferredappointmentdaycode"); + } + set + { + this.OnPropertyChanging("PreferredAppointmentDayCode"); + this.SetAttributeValue("preferredappointmentdaycode", value); + this.OnPropertyChanged("PreferredAppointmentDayCode"); + } + } + + /// + /// Select the preferred time of day for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmenttimecode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredAppointmentTimeCode + { + get + { + return this.GetAttributeValue("preferredappointmenttimecode"); + } + set + { + this.OnPropertyChanging("PreferredAppointmentTimeCode"); + this.SetAttributeValue("preferredappointmenttimecode", value); + this.OnPropertyChanged("PreferredAppointmentTimeCode"); + } + } + + /// + /// Select the preferred method of contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredcontactmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredContactMethodCode + { + get + { + return this.GetAttributeValue("preferredcontactmethodcode"); + } + set + { + this.OnPropertyChanging("PreferredContactMethodCode"); + this.SetAttributeValue("preferredcontactmethodcode", value); + this.OnPropertyChanged("PreferredContactMethodCode"); + } + } + + /// + /// Choose the account's preferred service facility or equipment to make sure services are scheduled correctly for the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredequipmentid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredEquipmentId + { + get + { + return this.GetAttributeValue("preferredequipmentid"); + } + set + { + this.OnPropertyChanging("PreferredEquipmentId"); + this.SetAttributeValue("preferredequipmentid", value); + this.OnPropertyChanged("PreferredEquipmentId"); + } + } + + /// + /// Choose the account's preferred service for reference when you schedule service activities. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredserviceid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredServiceId + { + get + { + return this.GetAttributeValue("preferredserviceid"); + } + set + { + this.OnPropertyChanging("PreferredServiceId"); + this.SetAttributeValue("preferredserviceid", value); + this.OnPropertyChanged("PreferredServiceId"); + } + } + + /// + /// Choose the preferred service representative for reference when you schedule service activities for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredsystemuserid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredSystemUserId + { + get + { + return this.GetAttributeValue("preferredsystemuserid"); + } + set + { + this.OnPropertyChanging("PreferredSystemUserId"); + this.SetAttributeValue("preferredsystemuserid", value); + this.OnPropertyChanged("PreferredSystemUserId"); + } + } + + /// + /// Choose the primary contact for the account to provide quick access to contact details. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarycontactid")] + public Microsoft.Xrm.Sdk.EntityReference PrimaryContactId + { + get + { + return this.GetAttributeValue("primarycontactid"); + } + set + { + this.OnPropertyChanging("PrimaryContactId"); + this.SetAttributeValue("primarycontactid", value); + this.OnPropertyChanged("PrimaryContactId"); + } + } + + /// + /// Primary Satori ID for Account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarysatoriid")] + public string PrimarySatoriId + { + get + { + return this.GetAttributeValue("primarysatoriid"); + } + set + { + this.OnPropertyChanging("PrimarySatoriId"); + this.SetAttributeValue("primarysatoriid", value); + this.OnPropertyChanged("PrimarySatoriId"); + } + } + + /// + /// Primary Twitter ID for Account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarytwitterid")] + public string PrimaryTwitterId + { + get + { + return this.GetAttributeValue("primarytwitterid"); + } + set + { + this.OnPropertyChanging("PrimaryTwitterId"); + this.SetAttributeValue("primarytwitterid", value); + this.OnPropertyChanged("PrimaryTwitterId"); + } + } + + /// + /// Shows the ID of the process. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("processid")] + public System.Nullable ProcessId + { + get + { + return this.GetAttributeValue>("processid"); + } + set + { + this.OnPropertyChanging("ProcessId"); + this.SetAttributeValue("processid", value); + this.OnPropertyChanged("ProcessId"); + } + } + + /// + /// Account Payable + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_accountpayable")] + public System.Nullable psa_AccountPayable + { + get + { + return this.GetAttributeValue>("psa_accountpayable"); + } + set + { + this.OnPropertyChanging("psa_AccountPayable"); + this.SetAttributeValue("psa_accountpayable", value); + this.OnPropertyChanged("psa_AccountPayable"); + } + } + + /// + /// Account Payable Number + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_accountpayablenumber")] + public string psa_AccountPayableNumber + { + get + { + return this.GetAttributeValue("psa_accountpayablenumber"); + } + set + { + this.OnPropertyChanging("psa_AccountPayableNumber"); + this.SetAttributeValue("psa_accountpayablenumber", value); + this.OnPropertyChanged("psa_AccountPayableNumber"); + } + } + + /// + /// Account Receivable + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_accountreceivable")] + public System.Nullable psa_AccountReceivable + { + get + { + return this.GetAttributeValue>("psa_accountreceivable"); + } + set + { + this.OnPropertyChanging("psa_AccountReceivable"); + this.SetAttributeValue("psa_accountreceivable", value); + this.OnPropertyChanged("psa_AccountReceivable"); + } + } + + /// + /// Account Receivable Number + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_accountreceivablenumber")] + public string psa_AccountReceivableNumber + { + get + { + return this.GetAttributeValue("psa_accountreceivablenumber"); + } + set + { + this.OnPropertyChanging("psa_AccountReceivableNumber"); + this.SetAttributeValue("psa_accountreceivablenumber", value); + this.OnPropertyChanged("psa_AccountReceivableNumber"); + } + } + + /// + /// Bank Account Number + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_bankaccountnumber")] + public string psa_BankAccountNumber + { + get + { + return this.GetAttributeValue("psa_bankaccountnumber"); + } + set + { + this.OnPropertyChanging("psa_BankAccountNumber"); + this.SetAttributeValue("psa_bankaccountnumber", value); + this.OnPropertyChanged("psa_BankAccountNumber"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_bankidentificationcode")] + public string psa_bankidentificationcode + { + get + { + return this.GetAttributeValue("psa_bankidentificationcode"); + } + set + { + this.OnPropertyChanging("psa_bankidentificationcode"); + this.SetAttributeValue("psa_bankidentificationcode", value); + this.OnPropertyChanged("psa_bankidentificationcode"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_chamberofcommercenumber")] + public string psa_ChamberOfCommerceNumber + { + get + { + return this.GetAttributeValue("psa_chamberofcommercenumber"); + } + set + { + this.OnPropertyChanging("psa_ChamberOfCommerceNumber"); + this.SetAttributeValue("psa_chamberofcommercenumber", value); + this.OnPropertyChanged("psa_ChamberOfCommerceNumber"); + } + } + + /// + /// Due Days + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_duedays")] + public System.Nullable psa_DueDays + { + get + { + return this.GetAttributeValue>("psa_duedays"); + } + set + { + this.OnPropertyChanging("psa_DueDays"); + this.SetAttributeValue("psa_duedays", value); + this.OnPropertyChanged("psa_DueDays"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_excludefrompaymentbatch")] + public System.Nullable psa_ExcludeFromPaymentBatch + { + get + { + return this.GetAttributeValue>("psa_excludefrompaymentbatch"); + } + set + { + this.OnPropertyChanging("psa_ExcludeFromPaymentBatch"); + this.SetAttributeValue("psa_excludefrompaymentbatch", value); + this.OnPropertyChanged("psa_ExcludeFromPaymentBatch"); + } + } + + /// + /// Export as XML for Accounting System + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_export")] + public System.Nullable psa_Export + { + get + { + return this.GetAttributeValue>("psa_export"); + } + set + { + this.OnPropertyChanging("psa_Export"); + this.SetAttributeValue("psa_export", value); + this.OnPropertyChanged("psa_Export"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_icp")] + public System.Nullable psa_Icp + { + get + { + return this.GetAttributeValue>("psa_icp"); + } + set + { + this.OnPropertyChanging("psa_Icp"); + this.SetAttributeValue("psa_icp", value); + this.OnPropertyChanged("psa_Icp"); + } + } + + /// + /// Ledger Lookup + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_ledger")] + public Microsoft.Xrm.Sdk.EntityReference psa_Ledger + { + get + { + return this.GetAttributeValue("psa_ledger"); + } + set + { + this.OnPropertyChanging("psa_Ledger"); + this.SetAttributeValue("psa_ledger", value); + this.OnPropertyChanged("psa_Ledger"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_outstandingamount")] + public Microsoft.Xrm.Sdk.Money psa_OutstandingAmount + { + get + { + return this.GetAttributeValue("psa_outstandingamount"); + } + set + { + this.OnPropertyChanging("psa_OutstandingAmount"); + this.SetAttributeValue("psa_outstandingamount", value); + this.OnPropertyChanged("psa_OutstandingAmount"); + } + } + + /// + /// Value of the Outstanding Amount in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_outstandingamount_base")] + public Microsoft.Xrm.Sdk.Money psa_outstandingamount_Base + { + get + { + return this.GetAttributeValue("psa_outstandingamount_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_outstandingamountaggregated")] + public Microsoft.Xrm.Sdk.Money psa_OutstandingAmountAggregated + { + get + { + return this.GetAttributeValue("psa_outstandingamountaggregated"); + } + set + { + this.OnPropertyChanging("psa_OutstandingAmountAggregated"); + this.SetAttributeValue("psa_outstandingamountaggregated", value); + this.OnPropertyChanged("psa_OutstandingAmountAggregated"); + } + } + + /// + /// Value of the Outstanding Amount Aggregated in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_outstandingamountaggregated_base")] + public Microsoft.Xrm.Sdk.Money psa_outstandingamountaggregated_Base + { + get + { + return this.GetAttributeValue("psa_outstandingamountaggregated_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuelastyear")] + public Microsoft.Xrm.Sdk.Money psa_RevenueLastYear + { + get + { + return this.GetAttributeValue("psa_revenuelastyear"); + } + set + { + this.OnPropertyChanging("psa_RevenueLastYear"); + this.SetAttributeValue("psa_revenuelastyear", value); + this.OnPropertyChanged("psa_RevenueLastYear"); + } + } + + /// + /// Value of the Revenue Last Year in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuelastyear_base")] + public Microsoft.Xrm.Sdk.Money psa_revenuelastyear_Base + { + get + { + return this.GetAttributeValue("psa_revenuelastyear_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuelastyearaggregated")] + public Microsoft.Xrm.Sdk.Money psa_RevenueLastYearAggregated + { + get + { + return this.GetAttributeValue("psa_revenuelastyearaggregated"); + } + set + { + this.OnPropertyChanging("psa_RevenueLastYearAggregated"); + this.SetAttributeValue("psa_revenuelastyearaggregated", value); + this.OnPropertyChanged("psa_RevenueLastYearAggregated"); + } + } + + /// + /// Value of the Revenue Last Year Aggregated in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuelastyearaggregated_base")] + public Microsoft.Xrm.Sdk.Money psa_revenuelastyearaggregated_Base + { + get + { + return this.GetAttributeValue("psa_revenuelastyearaggregated_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuethisyear")] + public Microsoft.Xrm.Sdk.Money psa_RevenueThisYear + { + get + { + return this.GetAttributeValue("psa_revenuethisyear"); + } + set + { + this.OnPropertyChanging("psa_RevenueThisYear"); + this.SetAttributeValue("psa_revenuethisyear", value); + this.OnPropertyChanged("psa_RevenueThisYear"); + } + } + + /// + /// Value of the Revenue This Year in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuethisyear_base")] + public Microsoft.Xrm.Sdk.Money psa_revenuethisyear_Base + { + get + { + return this.GetAttributeValue("psa_revenuethisyear_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuethisyearaggregated")] + public Microsoft.Xrm.Sdk.Money psa_RevenueThisYearAggregated + { + get + { + return this.GetAttributeValue("psa_revenuethisyearaggregated"); + } + set + { + this.OnPropertyChanging("psa_RevenueThisYearAggregated"); + this.SetAttributeValue("psa_revenuethisyearaggregated", value); + this.OnPropertyChanged("psa_RevenueThisYearAggregated"); + } + } + + /// + /// Value of the Revenue This Year Aggregated in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_revenuethisyearaggregated_base")] + public Microsoft.Xrm.Sdk.Money psa_revenuethisyearaggregated_Base + { + get + { + return this.GetAttributeValue("psa_revenuethisyearaggregated_base"); + } + } + + /// + /// Unique identifier for Tax Group associated with Account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_taxgroup")] + public Microsoft.Xrm.Sdk.EntityReference psa_TaxGroup + { + get + { + return this.GetAttributeValue("psa_taxgroup"); + } + set + { + this.OnPropertyChanging("psa_TaxGroup"); + this.SetAttributeValue("psa_taxgroup", value); + this.OnPropertyChanged("psa_TaxGroup"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_thisyear")] + public System.Nullable psa_ThisYear + { + get + { + return this.GetAttributeValue>("psa_thisyear"); + } + set + { + this.OnPropertyChanging("psa_ThisYear"); + this.SetAttributeValue("psa_thisyear", value); + this.OnPropertyChanged("psa_ThisYear"); + } + } + + /// + /// VAT Registration Number + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_vatregistrationnumber")] + public string psa_VatRegistrationNumber + { + get + { + return this.GetAttributeValue("psa_vatregistrationnumber"); + } + set + { + this.OnPropertyChanging("psa_VatRegistrationNumber"); + this.SetAttributeValue("psa_vatregistrationnumber", value); + this.OnPropertyChanged("psa_VatRegistrationNumber"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wip")] + public Microsoft.Xrm.Sdk.Money psa_WIP + { + get + { + return this.GetAttributeValue("psa_wip"); + } + set + { + this.OnPropertyChanging("psa_WIP"); + this.SetAttributeValue("psa_wip", value); + this.OnPropertyChanged("psa_WIP"); + } + } + + /// + /// Value of the WIP in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wip_base")] + public Microsoft.Xrm.Sdk.Money psa_wip_Base + { + get + { + return this.GetAttributeValue("psa_wip_base"); + } + } + + /// + /// Actuals Selling Amount minus Invoiced. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wipactuals")] + public Microsoft.Xrm.Sdk.Money psa_WipActuals + { + get + { + return this.GetAttributeValue("psa_wipactuals"); + } + set + { + this.OnPropertyChanging("psa_WipActuals"); + this.SetAttributeValue("psa_wipactuals", value); + this.OnPropertyChanged("psa_WipActuals"); + } + } + + /// + /// Value of the WIP Actuals in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wipactuals_base")] + public Microsoft.Xrm.Sdk.Money psa_wipactuals_Base + { + get + { + return this.GetAttributeValue("psa_wipactuals_base"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wipaggregated")] + public Microsoft.Xrm.Sdk.Money psa_WIPAggregated + { + get + { + return this.GetAttributeValue("psa_wipaggregated"); + } + set + { + this.OnPropertyChanging("psa_WIPAggregated"); + this.SetAttributeValue("psa_wipaggregated", value); + this.OnPropertyChanged("psa_WIPAggregated"); + } + } + + /// + /// Value of the WIP Aggregated in base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_wipaggregated_base")] + public Microsoft.Xrm.Sdk.Money psa_wipaggregated_Base + { + get + { + return this.GetAttributeValue("psa_wipaggregated_base"); + } + } + + /// + /// Type the annual revenue for the account, used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("revenue")] + public Microsoft.Xrm.Sdk.Money Revenue + { + get + { + return this.GetAttributeValue("revenue"); + } + set + { + this.OnPropertyChanging("Revenue"); + this.SetAttributeValue("revenue", value); + this.OnPropertyChanged("Revenue"); + } + } + + /// + /// Shows the annual revenue converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("revenue_base")] + public Microsoft.Xrm.Sdk.Money Revenue_Base + { + get + { + return this.GetAttributeValue("revenue_base"); + } + } + + /// + /// Type the number of shares available to the public for the account. This number is used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("sharesoutstanding")] + public System.Nullable SharesOutstanding + { + get + { + return this.GetAttributeValue>("sharesoutstanding"); + } + set + { + this.OnPropertyChanging("SharesOutstanding"); + this.SetAttributeValue("sharesoutstanding", value); + this.OnPropertyChanged("SharesOutstanding"); + } + } + + /// + /// Select a shipping method for deliveries sent to the account's address to designate the preferred carrier or other delivery option. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue ShippingMethodCode + { + get + { + return this.GetAttributeValue("shippingmethodcode"); + } + set + { + this.OnPropertyChanging("ShippingMethodCode"); + this.SetAttributeValue("shippingmethodcode", value); + this.OnPropertyChanged("ShippingMethodCode"); + } + } + + /// + /// Type the Standard Industrial Classification (SIC) code that indicates the account's primary industry of business, for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("sic")] + public string SIC + { + get + { + return this.GetAttributeValue("sic"); + } + set + { + this.OnPropertyChanging("SIC"); + this.SetAttributeValue("sic", value); + this.OnPropertyChanged("SIC"); + } + } + + /// + /// Choose the service level agreement (SLA) that you want to apply to the Account record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("slaid")] + public Microsoft.Xrm.Sdk.EntityReference SLAId + { + get + { + return this.GetAttributeValue("slaid"); + } + set + { + this.OnPropertyChanging("SLAId"); + this.SetAttributeValue("slaid", value); + this.OnPropertyChanged("SLAId"); + } + } + + /// + /// Last SLA that was applied to this case. This field is for internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("slainvokedid")] + public Microsoft.Xrm.Sdk.EntityReference SLAInvokedId + { + get + { + return this.GetAttributeValue("slainvokedid"); + } + } + + /// + /// Shows the ID of the stage. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("stageid")] + public System.Nullable StageId + { + get + { + return this.GetAttributeValue>("stageid"); + } + set + { + this.OnPropertyChanging("StageId"); + this.SetAttributeValue("stageid", value); + this.OnPropertyChanged("StageId"); + } + } + } + +} \ No newline at end of file diff --git a/XrmEntitySerializer.Tests/EntityTests.cs b/XrmEntitySerializer.Tests/EntityTests.cs index 9f4593f..270afe2 100644 --- a/XrmEntitySerializer.Tests/EntityTests.cs +++ b/XrmEntitySerializer.Tests/EntityTests.cs @@ -174,5 +174,44 @@ public void CreatingAnEntitySerializerWithNullConvertersThrows() JsonSerializer serializer = new EntitySerializer(serializers); }); } + + [Fact] + public void EarlyBoundEntityCanBeSerializedAndDeserialized() + { + AlbanianXrm.EarlyBound.Account entity = new AlbanianXrm.EarlyBound.Account(); + entity.Id = Guid.NewGuid(); + + EntityReference entityReference = new EntityReference("contact", Guid.NewGuid()); + entityReference.Name = "Primary Contact"; + entity.PrimaryContactId = entityReference; + entity.FormattedValues.Add("primarycontactid", entityReference.Name); +#if !XRM_7 && !XRM_6 && !XRM_5 + entity.KeyAttributes.Add("name", "Unique Account"); +#endif + + JsonSerializer serializer = new EntitySerializer(); + + MemoryStream memoryStream = new MemoryStream(new byte[9000], true); + + using (StreamWriter writer = new StreamWriter(memoryStream)) + { + serializer.Serialize(new JsonTextWriter(writer), entity); + } + + AlbanianXrm.EarlyBound.Account deserializedEntity; + memoryStream = new MemoryStream(memoryStream.ToArray()); + using (StreamReader reader = new StreamReader(memoryStream)) + { + deserializedEntity = (AlbanianXrm.EarlyBound.Account)serializer.Deserialize(new JsonTextReader(reader)); + } + + Assert.Equal(entity.LogicalName, deserializedEntity.LogicalName); + Assert.Equal(entity.Id, deserializedEntity.Id); + Assert.Equal(entity.Attributes.Count, deserializedEntity.Attributes.Count); + +#if !XRM_7 && !XRM_6 && !XRM_5 + Assert.Equal(entity.KeyAttributes.Count, deserializedEntity.KeyAttributes.Count); +#endif + } } } diff --git a/XrmEntitySerializer.Tests/XrmEntitySerializer.Tests.projitems b/XrmEntitySerializer.Tests/XrmEntitySerializer.Tests.projitems index 0819937..f882659 100644 --- a/XrmEntitySerializer.Tests/XrmEntitySerializer.Tests.projitems +++ b/XrmEntitySerializer.Tests/XrmEntitySerializer.Tests.projitems @@ -10,6 +10,7 @@ + diff --git a/XrmEntitySerializer/AttributeCollectionConverter.cs b/XrmEntitySerializer/AttributeCollectionConverter.cs index fe3a06c..907b804 100644 --- a/XrmEntitySerializer/AttributeCollectionConverter.cs +++ b/XrmEntitySerializer/AttributeCollectionConverter.cs @@ -10,14 +10,23 @@ public class AttributeCollectionConverter : CollectionTypeConverter pair = item.ToObject>(serializer); - existingAttributes.Add(pair.Key, pair.Value); + if (checkExisting && existingAttributes.ContainsKey(pair.Key)) + { + existingAttributes[pair.Key] = pair.Value; + } + else + { + existingAttributes.Add(pair.Key, pair.Value); + } } return existingAttributes; } From 90a5419ec186bdf7fbc8d334339a3d46986157e5 Mon Sep 17 00:00:00 2001 From: Betim Beja <11160171+BetimBeja@users.noreply.github.com> Date: Tue, 19 Apr 2022 06:50:42 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=9A=80=20Updated=20Version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XrmEntitySerializer.Version.props | 8 ++++---- XrmEntitySerializer.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/XrmEntitySerializer.Version.props b/XrmEntitySerializer.Version.props index 09d46af..3ccd8f3 100644 --- a/XrmEntitySerializer.Version.props +++ b/XrmEntitySerializer.Version.props @@ -5,9 +5,9 @@ Betim Beja Betim Beja Betim Beja - 1.3.2 - 1.3.2 - 1.3.2.0 - 1.3.2.0 + 1.3.3 + 1.3.3 + 1.3.3.0 + 1.3.3.0 \ No newline at end of file diff --git a/XrmEntitySerializer.props b/XrmEntitySerializer.props index 270f46c..e308554 100644 --- a/XrmEntitySerializer.props +++ b/XrmEntitySerializer.props @@ -16,8 +16,8 @@ This library can serialize an Microsoft.Xrm.Sdk.Entity to Json and back using Newtonsoft.Json library. - - v1.3.2: - a. Improved deserialization for RemoteExecutionContext in an Azure Function + - v1.3.3: + a. Fixed a bug with Early-Bound entities From 0a2d18a575e05cb8a26f1949af75828f27c1e163 Mon Sep 17 00:00:00 2001 From: Betim Beja <11160171+BetimBeja@users.noreply.github.com> Date: Tue, 19 Apr 2022 06:55:33 +0200 Subject: [PATCH 3/3] fixed pipeline versions --- .github/workflows/build-and-pack.yml | 2 +- .github/workflows/build-and-test.yml | 2 +- azure-pipelines.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-pack.yml b/.github/workflows/build-and-pack.yml index f247129..8a83893 100644 --- a/.github/workflows/build-and-pack.yml +++ b/.github/workflows/build-and-pack.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v1.8.0 with: - dotnet-version: 5.0.x + dotnet-version: 6.0.x - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c694a8e..e3d66c0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v1.8.0 with: - dotnet-version: 5.0.x + dotnet-version: 6.0.x - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 52102b2..82c89dd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ pool: - vmImage: 'windows-2019' + vmImage: 'windows-2022' steps: - task: NuGetToolInstaller@0