From c300afadb5df033b0c633bc016b53a508241dee8 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 02:35:47 +0200 Subject: [PATCH 01/10] Update namespaces, upgrade abstractions version, add tests for new FindReflectedType method --- CHANGELOG.md | 8 +- src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj | 12 +-- .../XrmFakedContext.Queries.cs | 78 ++++++++++++++++++- .../Extensions/EntityExtensionsTests.cs | 2 +- .../EntityMetadataExtensionsTests.cs | 2 +- .../OrganizationRequestExtensionsTests.cs | 2 +- .../QueryExpressionExtensionsTests.cs | 2 +- .../DateTimeBehaviourTests.cs | 2 +- .../FakeContextTestCreateQuery.cs | 2 +- .../FakeContextTests/FakeContextTestDelete.cs | 2 +- .../FakeContextTestMetadata.cs | 2 +- .../FakeContextTests.AddEntity.cs | 2 +- .../FakeContextTests/FakeContextTests.cs | 14 +++- .../FakeTracingServiceTests.cs | 2 +- .../ConditionExpressionTests.cs | 2 +- .../FakeContextTestFormattedValues.cs | 2 +- ...FakeContextTestTranslateQueryExpression.cs | 2 +- .../FilterExpressionTests.cs | 2 +- .../DateTime/DateTimeOperatorsTests.cs | 2 +- .../MultiSelectOptionSetTests.cs | 2 +- .../Strings/StringOperatorsTests.cs | 2 +- .../OrderByTests.cs | 2 +- .../ValidateReferencesTests.cs | 2 +- .../XrmFakedRelationshipTests.cs | 2 +- .../FakeXrmEasyTestsBase.cs | 2 +- tests/FakeXrmEasy.Core.Tests/Issue116.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue125.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue156.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue165.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue180.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue191.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue226.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue253.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue256.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue300.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue312.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue328.cs | 2 +- .../FakeXrmEasy.Core.Tests/Issues/Issue467.cs | 2 +- .../TestCRMHandlingOfNullsAndMissingFields.cs | 2 +- .../AssociateRequestTests.cs | 2 +- .../FakeContextTestCreate.cs | 2 +- .../DeleteRequestTests/DeleteRequestTests.cs | 2 +- .../DisassociateRequestTests.cs | 2 +- .../QueryLinkEntityTests.cs | 2 +- .../RetrieveMultipleTests.cs | 2 +- .../RetrieveRequestTests.cs | 2 +- .../UpdateRequestTests/UpdateRequestTests.cs | 2 +- .../UpsertRequestTests/UpsertRequestTests.cs | 2 +- .../MiddlewareBuilderTests.ExecutionMocks.cs | 2 +- ...areBuilderTests.GenericMessageExecutors.cs | 2 +- ...MiddlewareBuilderTests.MessageExecutors.cs | 2 +- .../Middleware/MiddlewareBuilderTests.cs | 2 +- .../Query/FetchXml/AggregateTests.cs | 2 +- .../Query/FetchXml/ConditionOperatorTests.cs | 2 +- .../FakeContextTestFetchXmlTranslation.cs | 2 +- .../Strings/StringOperatorTests.cs | 2 +- .../Query/FetchXml/TypeConversionTests.cs | 2 +- .../EqualityWithDifferentDataTypesTests.cs | 2 +- .../LinqTests/FakeContextTestLinqQueries.cs | 2 +- .../Query/LinqTests/MetadataInferenceTests.cs | 2 +- .../QueryByAttribute/QueryByAttributeTests.cs | 2 +- ...ueryExpressionPagingInfoExtensionsTests.cs | 2 +- .../QueryExpressionTests/TopCountTests.cs | 2 +- .../QueryLookupTests/QueryLookupTests.cs | 2 +- .../Query/QueryTests/BusinessIdTests.cs | 2 +- .../QueryTranslationTests/ProjectionTests.cs | 2 +- .../InvoiceDetailInitializerServiceTests.cs | 2 +- .../InvoiceInitializerServiceTests.cs | 2 +- .../TestDefaultEntityInitializer.cs | 2 +- .../Tracing/IXrmFakedTracingServiceTests.cs | 2 +- .../XrmRealContextTests.cs | 2 +- 71 files changed, 168 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b63ca0e..3a83164b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ ## [2.3.3] +### Added + +- New method to retrieve early bound types based on EntityTypeCode. + ### Changed -- Upgraded GitHub Actions to update Java major version to run SonarCloud analysis - https://github.com/DynamicsValue/fake-xrm-easy/issues/110 -º +- Update namespaces in tests project for consistency + - Upgraded GitHub Actions to update Java major version to run SonarCloud analysis - https://github.com/DynamicsValue/fake-xrm-easy/issues/110 - Introduced new NewEntityRecord method to easily create instances of entity records based on the current use of early-bound or late-bound entities - Resolves an issue with query evaluation and MultiOptionSets when using late bound entities or if type information is not present. - https://github.com/DynamicsValue/fake-xrm-easy/issues/66 diff --git a/src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj b/src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj index 57b7c203..3e8e07da 100644 --- a/src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj +++ b/src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj @@ -102,22 +102,22 @@ - + - + - + - + - + - + diff --git a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs index 2457f742..bdd2e55c 100644 --- a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs +++ b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs @@ -18,7 +18,7 @@ namespace FakeXrmEasy public partial class XrmFakedContext : IXrmFakedContext { /// - /// + /// Finds the early-bound type based on an entity's logical name /// /// /// @@ -45,6 +45,35 @@ public Type FindReflectedType(string logicalName) return types.SingleOrDefault(); } + + /// + /// Finds the early-bound type based on an entity's generated type code + /// + /// + /// + /// + public Type FindReflectedType(int entityTypeCode) + { + var types = + ProxyTypesAssemblies.Select(a => FindReflectedType(entityTypeCode, a)) + .Where(t => t != null); + + if (types.Count() > 1) + { + var errorMsg = $"Type { entityTypeCode } is defined in multiple assemblies: "; + foreach (var type in types) + { + errorMsg += type.Assembly + .GetName() + .Name + "; "; + } + var lastIndex = errorMsg.LastIndexOf("; "); + errorMsg = errorMsg.Substring(0, lastIndex) + "."; + throw new InvalidOperationException(errorMsg); + } + + return types.SingleOrDefault(); + } /// /// Finds reflected type for given entity from given assembly. @@ -92,6 +121,53 @@ private static Type FindReflectedType(string logicalName, throw new Exception("XrmFakedContext.FindReflectedType: " + s); } } + + /// + /// Finds reflected type for given entity from given assembly. + /// + /// + /// Entity logical name which type is searched from given + /// . + /// + /// + /// Assembly where early-bound type is searched for given + /// . + /// + /// + /// Early-bound type of if it's found + /// from . Otherwise null is returned. + /// + private static Type FindReflectedType(int entityTypeCode, + Assembly assembly) + { + try + { + if (assembly == null) + { + throw new ArgumentNullException(nameof(assembly)); + } + + var subClassType = assembly.GetTypes() + .Where(t => typeof(Entity).IsAssignableFrom(t)) + .Where(t => t.GetCustomAttributes(typeof(EntityLogicalNameAttribute), true).Length > 0) + .Where(t => t.GetField("EntityTypeCode").GetValue(null).Equals(entityTypeCode)) + .FirstOrDefault(); + + return subClassType; + } + catch (ReflectionTypeLoadException exception) + { + // now look at ex.LoaderExceptions - this is an Exception[], so: + var s = ""; + foreach (var innerException in exception.LoaderExceptions) + { + // write details of "inner", in particular inner.Message + s += innerException.Message + " "; + } + + throw new Exception("XrmFakedContext.FindReflectedType: " + s); + } + } /// /// diff --git a/tests/FakeXrmEasy.Core.Tests/Extensions/EntityExtensionsTests.cs b/tests/FakeXrmEasy.Core.Tests/Extensions/EntityExtensionsTests.cs index d8dbe1af..431ce04f 100644 --- a/tests/FakeXrmEasy.Core.Tests/Extensions/EntityExtensionsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Extensions/EntityExtensionsTests.cs @@ -5,7 +5,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.Extensions +namespace FakeXrmEasy.Core.Tests.Extensions { public class EntityExtensionsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Extensions/EntityMetadataExtensionsTests.cs b/tests/FakeXrmEasy.Core.Tests/Extensions/EntityMetadataExtensionsTests.cs index 89942d09..0fdea9d5 100644 --- a/tests/FakeXrmEasy.Core.Tests/Extensions/EntityMetadataExtensionsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Extensions/EntityMetadataExtensionsTests.cs @@ -4,7 +4,7 @@ using Xunit; using System.Collections.Generic; -namespace FakeXrmEasy.Tests.Extensions +namespace FakeXrmEasy.Core.Tests.Extensions { public class EntityMetadataExtensionsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Extensions/OrganizationRequestExtensionsTests.cs b/tests/FakeXrmEasy.Core.Tests/Extensions/OrganizationRequestExtensionsTests.cs index b89d9724..336be3fe 100644 --- a/tests/FakeXrmEasy.Core.Tests/Extensions/OrganizationRequestExtensionsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Extensions/OrganizationRequestExtensionsTests.cs @@ -7,7 +7,7 @@ using System; using Xunit; -namespace FakeXrmEasy.Tests.Extensions +namespace FakeXrmEasy.Core.Tests.Extensions { public class OrganizationRequestExtensionsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Extensions/QueryExpressionExtensionsTests.cs b/tests/FakeXrmEasy.Core.Tests/Extensions/QueryExpressionExtensionsTests.cs index 169c732d..411fb662 100644 --- a/tests/FakeXrmEasy.Core.Tests/Extensions/QueryExpressionExtensionsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Extensions/QueryExpressionExtensionsTests.cs @@ -3,7 +3,7 @@ using Microsoft.Xrm.Sdk.Query; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests.Extensions +namespace FakeXrmEasy.Core.Tests.Extensions { public class QueryExpressionExtensionsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/DateTimeBehaviourTests/DateTimeBehaviourTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/DateTimeBehaviourTests/DateTimeBehaviourTests.cs index d95e76d0..8f2d9312 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/DateTimeBehaviourTests/DateTimeBehaviourTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/DateTimeBehaviourTests/DateTimeBehaviourTests.cs @@ -10,7 +10,7 @@ using Xunit; using FakeXrmEasy.Extensions; -namespace FakeXrmEasy.Tests.FakeContextTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests { public class DateTimeBehaviourTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestCreateQuery.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestCreateQuery.cs index 7ed340d0..059367fc 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestCreateQuery.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestCreateQuery.cs @@ -7,7 +7,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeContextTestCreateQuery: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestDelete.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestDelete.cs index c5bab8ce..8acd2d9d 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestDelete.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestDelete.cs @@ -8,7 +8,7 @@ using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeXrmEasyTestsDelete : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestMetadata.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestMetadata.cs index 72d81b51..d14f4e33 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestMetadata.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTestMetadata.cs @@ -5,7 +5,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests { public class FakeContextTestMetadata : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.AddEntity.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.AddEntity.cs index 3aacc250..73f1e83c 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.AddEntity.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.AddEntity.cs @@ -2,7 +2,7 @@ using Crm; using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeXrmEasyTestsAddEntity : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs index fe00466e..b463ffa8 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs @@ -9,7 +9,7 @@ using Crm; using System.Reflection; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeContextCoreTests : FakeXrmEasyTestsBase { @@ -300,7 +300,7 @@ public void Should_return_entity_by_id() } [Fact] - public void Should_return_error_if_entity_lofical_name_doesnt_exists() + public void Should_return_error_if_entity_logical_name_doesnt_exists() { Assert.Throws(() =>_context.GetEntityById("doesNotExist", Guid.NewGuid())); } @@ -318,5 +318,15 @@ public void Should_return_error_if_entity_id_does_not_exists() Assert.Throws(() =>_context.GetEntityById("contact", Guid.NewGuid())); } + + [Fact] + public void Should_find_reflected_type_by_entity_type_code() { + + var assembly = typeof(Crm.Account).Assembly; + _context.EnableProxyTypes(assembly); + + var type = _context.FindReflectedType(1); + Assert.Equal(typeof(Account), type); + } } } diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeTracingServiceTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeTracingServiceTests.cs index 350d8493..11c96b51 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeTracingServiceTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeTracingServiceTests.cs @@ -1,7 +1,7 @@ using Xunit; using System; -namespace FakeXrmEasy.Tests.FakeContextTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests { public class FakeTracingServiceTests { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/ConditionExpressionTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/ConditionExpressionTests.cs index d1d8fc3b..2572a71a 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/ConditionExpressionTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/ConditionExpressionTests.cs @@ -8,7 +8,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests { public class ConditionExpressionTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestFormattedValues.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestFormattedValues.cs index 9d7df45d..466a5576 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestFormattedValues.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestFormattedValues.cs @@ -7,7 +7,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests { public class FormattedValuesTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestTranslateQueryExpression.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestTranslateQueryExpression.cs index e52fa6c3..14cc79cb 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestTranslateQueryExpression.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FakeContextTestTranslateQueryExpression.cs @@ -10,7 +10,7 @@ using FakeXrmEasy.Abstractions; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeContextTestTranslateQueryExpression: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FilterExpressionTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FilterExpressionTests.cs index b9867c4e..cbbe55e8 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FilterExpressionTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/FilterExpressionTests.cs @@ -6,7 +6,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests { public class FilterExpressionTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/DateTime/DateTimeOperatorsTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/DateTime/DateTimeOperatorsTests.cs index 9beff2d2..61d31111 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/DateTime/DateTimeOperatorsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/DateTime/DateTimeOperatorsTests.cs @@ -7,7 +7,7 @@ using Xunit; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.DateTimes +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.DateTimes { public class DateTimeOperatorsTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/MultiSelectOptionSet/MultiSelectOptionSetTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/MultiSelectOptionSet/MultiSelectOptionSetTests.cs index 952c6eb2..87a28849 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/MultiSelectOptionSet/MultiSelectOptionSetTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/MultiSelectOptionSet/MultiSelectOptionSetTests.cs @@ -6,7 +6,7 @@ using Microsoft.Xrm.Sdk.Query; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.MultiSelectOptionSet +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.MultiSelectOptionSet { public class MultiSelectOptionSetTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/Strings/StringOperatorsTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/Strings/StringOperatorsTests.cs index 8935c0f7..4defa99d 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/Strings/StringOperatorsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OperatorTests/Strings/StringOperatorsTests.cs @@ -7,7 +7,7 @@ using Xunit; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.Strings +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests.OperatorTests.Strings { public class StringOperatorsTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OrderByTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OrderByTests.cs index 94d5ee5b..fc4c4b8f 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OrderByTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/TranslateQueryExpressionTests/OrderByTests.cs @@ -6,7 +6,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.TranslateQueryExpressionTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.TranslateQueryExpressionTests { public class OrderByTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/ValidateReferencesTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/ValidateReferencesTests.cs index c034767b..f46d45d9 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/ValidateReferencesTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/ValidateReferencesTests.cs @@ -13,7 +13,7 @@ using System.Collections.Generic; -namespace FakeXrmEasy.Tests.FakeContextTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests { public class ValidateReferencesTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/XrmFakedRelationshipTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/XrmFakedRelationshipTests.cs index 2af9236e..fe6184fc 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/XrmFakedRelationshipTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/XrmFakedRelationshipTests.cs @@ -5,7 +5,7 @@ using Xunit; using FakeXrmEasy.Abstractions; -namespace FakeXrmEasy.Tests.FakeContextTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests { public class XrmFakedRelationshipTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasyTestsBase.cs b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasyTestsBase.cs index 0c91abac..813e49f0 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasyTestsBase.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasyTestsBase.cs @@ -3,7 +3,7 @@ using FakeXrmEasy.Middleware; using Microsoft.Xrm.Sdk; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issue116.cs b/tests/FakeXrmEasy.Core.Tests/Issue116.cs index d34e964a..42247d28 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issue116.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issue116.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue116 : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue125.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue125.cs index 6ae986b6..b2ad8e50 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue125.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue125.cs @@ -7,7 +7,7 @@ using Xunit; using FakeXrmEasy.Abstractions; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue125 : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue156.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue156.cs index 92e6136f..e5f332b4 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue156.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue156.cs @@ -6,7 +6,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue156: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue165.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue165.cs index e49d3202..dcac7fb1 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue165.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue165.cs @@ -4,7 +4,7 @@ using Microsoft.Xrm.Sdk.Query; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue165: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue180.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue180.cs index 2c45e03a..b44f0efc 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue180.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue180.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue180 : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue191.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue191.cs index 6e744e20..444a0019 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue191.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue191.cs @@ -3,7 +3,7 @@ using System; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue191: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue226.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue226.cs index 43529786..f5f75acc 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue226.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue226.cs @@ -5,7 +5,7 @@ using System.Text; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue226: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue253.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue253.cs index f8ad4d1a..1f2fe613 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue253.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue253.cs @@ -9,7 +9,7 @@ using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue253: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue256.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue256.cs index 80e2d042..19bc2da8 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue256.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue256.cs @@ -7,7 +7,7 @@ using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue256: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue300.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue300.cs index eb95b4a2..ad3dfbb1 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue300.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue300.cs @@ -5,7 +5,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue300: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue312.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue312.cs index fb3ea859..3c24647d 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue312.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue312.cs @@ -4,7 +4,7 @@ using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue312: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue328.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue328.cs index 1b646dec..ac0bb5bf 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue328.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue328.cs @@ -6,7 +6,7 @@ using Microsoft.Xrm.Sdk.Query; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class Issue328: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/Issue467.cs b/tests/FakeXrmEasy.Core.Tests/Issues/Issue467.cs index 90bc00c0..11bf9b6a 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/Issue467.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/Issue467.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { // https://github.com/jordimontana82/fake-xrm-easy/issues/467 diff --git a/tests/FakeXrmEasy.Core.Tests/Issues/TestCRMHandlingOfNullsAndMissingFields.cs b/tests/FakeXrmEasy.Core.Tests/Issues/TestCRMHandlingOfNullsAndMissingFields.cs index ad19b950..c11acfc6 100644 --- a/tests/FakeXrmEasy.Core.Tests/Issues/TestCRMHandlingOfNullsAndMissingFields.cs +++ b/tests/FakeXrmEasy.Core.Tests/Issues/TestCRMHandlingOfNullsAndMissingFields.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests.Issues +namespace FakeXrmEasy.Core.Tests.Issues { public class TestCRMHandlingOfNullsAndMissingFields: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/AssociateRequestTests/AssociateRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/AssociateRequestTests/AssociateRequestTests.cs index 54014a94..21d38a96 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/AssociateRequestTests/AssociateRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/AssociateRequestTests/AssociateRequestTests.cs @@ -8,7 +8,7 @@ using Xunit; using FakeXrmEasy.Abstractions; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.AssociateRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.AssociateRequestTests { public class AssociateRequestTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/CreateRequestTests/FakeContextTestCreate.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/CreateRequestTests/FakeContextTestCreate.cs index 600f794f..71c65acf 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/CreateRequestTests/FakeContextTestCreate.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/CreateRequestTests/FakeContextTestCreate.cs @@ -10,7 +10,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.CreateRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.CreateRequestTests { public class CreateRequestTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DeleteRequestTests/DeleteRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DeleteRequestTests/DeleteRequestTests.cs index 277d7c1a..28f2d1d3 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DeleteRequestTests/DeleteRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DeleteRequestTests/DeleteRequestTests.cs @@ -12,7 +12,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.DeleteRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.DeleteRequestTests { public class DeleteRequestTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DisassociateRequestTests/DisassociateRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DisassociateRequestTests/DisassociateRequestTests.cs index abacfa0c..aa4e09d9 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DisassociateRequestTests/DisassociateRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/DisassociateRequestTests/DisassociateRequestTests.cs @@ -6,7 +6,7 @@ using Xunit; using FakeXrmEasy.Abstractions; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.DisassociateRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.DisassociateRequestTests { public class DisassociateRequestTests: FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/QueryLinkEntityTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/QueryLinkEntityTests.cs index 5283fcd3..a3b2450c 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/QueryLinkEntityTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/QueryLinkEntityTests.cs @@ -9,7 +9,7 @@ using Xunit; using FakeXrmEasy.Abstractions; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveMultipleRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveMultipleRequestTests { public class QueryLinkEntityTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/RetrieveMultipleTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/RetrieveMultipleTests.cs index 32426043..f3c8a7db 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/RetrieveMultipleTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveMultipleRequestTests/RetrieveMultipleTests.cs @@ -7,7 +7,7 @@ using System.Linq; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveMultipleRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveMultipleRequestTests { public class RetrieveMultipleTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveRequestTests/RetrieveRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveRequestTests/RetrieveRequestTests.cs index a78e2df3..844ff6cf 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveRequestTests/RetrieveRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/RetrieveRequestTests/RetrieveRequestTests.cs @@ -12,7 +12,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.RetrieveRequestTests { public class RetrieveRequestTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpdateRequestTests/UpdateRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpdateRequestTests/UpdateRequestTests.cs index 4d64f4b3..4d928e28 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpdateRequestTests/UpdateRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpdateRequestTests/UpdateRequestTests.cs @@ -12,7 +12,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.UpdateRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.UpdateRequestTests { public class UpdateRequestTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpsertRequestTests/UpsertRequestTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpsertRequestTests/UpsertRequestTests.cs index 3946753a..4148ddc9 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpsertRequestTests/UpsertRequestTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/Crud/FakeMessageExecutors/UpsertRequestTests/UpsertRequestTests.cs @@ -7,7 +7,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests.Middleware.Crud.FakeMessageExecutors.UpsertRequestTests +namespace FakeXrmEasy.Core.Tests.Middleware.Crud.FakeMessageExecutors.UpsertRequestTests { #if !FAKE_XRM_EASY && !FAKE_XRM_EASY_2013 && !FAKE_XRM_EASY_2015 public class UpsertRequestTests : FakeXrmEasyTestsBase diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.ExecutionMocks.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.ExecutionMocks.cs index b1196a6e..e5435c02 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.ExecutionMocks.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.ExecutionMocks.cs @@ -8,7 +8,7 @@ using Microsoft.Xrm.Sdk.Metadata; using FakeXrmEasy.Abstractions.FakeMessageExecutors; -namespace FakeXrmEasy.Tests.Middleware +namespace FakeXrmEasy.Core.Tests.Middleware { public partial class MiddlewareBuilderTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.GenericMessageExecutors.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.GenericMessageExecutors.cs index 601857e9..25d54334 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.GenericMessageExecutors.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.GenericMessageExecutors.cs @@ -10,7 +10,7 @@ using System.Reflection; using FakeXrmEasy.Abstractions.Exceptions; -namespace FakeXrmEasy.Tests.Middleware +namespace FakeXrmEasy.Core.Tests.Middleware { public class GenericMessageExecutorsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.MessageExecutors.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.MessageExecutors.cs index 8cb4b02b..eea0fad1 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.MessageExecutors.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.MessageExecutors.cs @@ -9,7 +9,7 @@ using FakeXrmEasy.Abstractions.FakeMessageExecutors; using Microsoft.Xrm.Sdk.Metadata; -namespace FakeXrmEasy.Tests.Middleware +namespace FakeXrmEasy.Core.Tests.Middleware { public partial class MiddlewareBuilderTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.cs b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.cs index 7bca9d2f..3f7b01d3 100644 --- a/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Middleware/MiddlewareBuilderTests.cs @@ -9,7 +9,7 @@ using FakeXrmEasy.Abstractions.Enums; using FakeXrmEasy.Abstractions.Exceptions; -namespace FakeXrmEasy.Tests.Middleware +namespace FakeXrmEasy.Core.Tests.Middleware { public partial class MiddlewareBuilderTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/AggregateTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/AggregateTests.cs index 5a7d3806..30bc1852 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/AggregateTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/AggregateTests.cs @@ -8,7 +8,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.FetchXml +namespace FakeXrmEasy.Core.Tests.FakeContextTests.FetchXml { public class AggregateTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/ConditionOperatorTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/ConditionOperatorTests.cs index 3b04970d..b3abaf1a 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/ConditionOperatorTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/ConditionOperatorTests.cs @@ -10,7 +10,7 @@ using FakeXrmEasy.Abstractions.Settings; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests.FakeContextTests.FetchXml +namespace FakeXrmEasy.Core.Tests.FakeContextTests.FetchXml { /// /// To test all different condition operators found in FetchXml diff --git a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/FakeContextTestFetchXmlTranslation.cs b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/FakeContextTestFetchXmlTranslation.cs index 99f21c4e..8df51479 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/FakeContextTestFetchXmlTranslation.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/FakeContextTestFetchXmlTranslation.cs @@ -9,7 +9,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.FetchXml +namespace FakeXrmEasy.Core.Tests.FakeContextTests.FetchXml { /// /// This will test that a fetchxml is correctly translated into a QueryExpression diff --git a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/OperatorTests/Strings/StringOperatorTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/OperatorTests/Strings/StringOperatorTests.cs index 9318a7e2..796b755e 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/OperatorTests/Strings/StringOperatorTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/OperatorTests/Strings/StringOperatorTests.cs @@ -6,7 +6,7 @@ using Xunit; using FakeXrmEasy.Query; -namespace FakeXrmEasy.Tests.FakeContextTests.FetchXml.OperatorTests.Strings +namespace FakeXrmEasy.Core.Tests.FakeContextTests.FetchXml.OperatorTests.Strings { public class StringOperatorTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/TypeConversionTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/TypeConversionTests.cs index b553a592..8acdc891 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/TypeConversionTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/FetchXml/TypeConversionTests.cs @@ -5,7 +5,7 @@ using System.Reflection; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.FetchXml +namespace FakeXrmEasy.Core.Tests.FakeContextTests.FetchXml { public class TypeConversionTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/EqualityWithDifferentDataTypesTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/EqualityWithDifferentDataTypesTests.cs index ad28b1fd..98f44cd3 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/EqualityWithDifferentDataTypesTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/EqualityWithDifferentDataTypesTests.cs @@ -8,7 +8,7 @@ using System.Reflection; //TypedEntities generated code for testing using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.LinqTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.LinqTests { /// /// Test suite to check that all the different CRM types in the SDK are supported: diff --git a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/FakeContextTestLinqQueries.cs b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/FakeContextTestLinqQueries.cs index 9da94ddf..cd4a7a80 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/FakeContextTestLinqQueries.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/FakeContextTestLinqQueries.cs @@ -10,7 +10,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class FakeContextTestLinqQueries : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/MetadataInferenceTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/MetadataInferenceTests.cs index 4df1d747..5b3cb20c 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/MetadataInferenceTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/LinqTests/MetadataInferenceTests.cs @@ -10,7 +10,7 @@ using System.Reflection; //TypedEntities generated code for testing using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.LinqTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.LinqTests { public class MetadataInferenceTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryByAttribute/QueryByAttributeTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryByAttribute/QueryByAttributeTests.cs index 4c8e3c10..4f5927c2 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryByAttribute/QueryByAttributeTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryByAttribute/QueryByAttributeTests.cs @@ -10,7 +10,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.QueryByAttributeTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.QueryByAttributeTests { public class Tests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionPagingInfoExtensionsTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionPagingInfoExtensionsTests.cs index e1b5338b..bfbbdca9 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionPagingInfoExtensionsTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionPagingInfoExtensionsTests.cs @@ -2,7 +2,7 @@ using Microsoft.Xrm.Sdk.Query; using Xunit; -namespace FakeXrmEasy.Tests.Query +namespace FakeXrmEasy.Core.Tests.Query { public class QueryExpressionPagingInfoExtensionsTests { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionTests/TopCountTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionTests/TopCountTests.cs index fd11251e..3197091e 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionTests/TopCountTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryExpressionTests/TopCountTests.cs @@ -6,7 +6,7 @@ using System.ServiceModel; using Xunit; -namespace FakeXrmEasy.Tests.Query.QueryExpressionTests +namespace FakeXrmEasy.Core.Tests.Query.QueryExpressionTests { public class TopCountTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryLookupTests/QueryLookupTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryLookupTests/QueryLookupTests.cs index 4b6a45ec..219c9d9b 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryLookupTests/QueryLookupTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryLookupTests/QueryLookupTests.cs @@ -7,7 +7,7 @@ using System.Collections.ObjectModel; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.QueryLookupTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.QueryLookupTests { public class Tests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryTests/BusinessIdTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryTests/BusinessIdTests.cs index fd868c7d..ec795222 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryTests/BusinessIdTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryTests/BusinessIdTests.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.QueryTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.QueryTests { public class EqualBusinessIdTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Query/QueryTranslationTests/ProjectionTests.cs b/tests/FakeXrmEasy.Core.Tests/Query/QueryTranslationTests/ProjectionTests.cs index d89cfbce..95b59762 100644 --- a/tests/FakeXrmEasy.Core.Tests/Query/QueryTranslationTests/ProjectionTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Query/QueryTranslationTests/ProjectionTests.cs @@ -3,7 +3,7 @@ using System; using Xunit; -namespace FakeXrmEasy.Tests.FakeContextTests.QueryTranslationTests +namespace FakeXrmEasy.Core.Tests.FakeContextTests.QueryTranslationTests { public class ProjectionTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceDetailInitializerServiceTests.cs b/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceDetailInitializerServiceTests.cs index b59f1c1f..8cd8c5de 100644 --- a/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceDetailInitializerServiceTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceDetailInitializerServiceTests.cs @@ -6,7 +6,7 @@ using FakeItEasy; using FakeXrmEasy.Services; -namespace FakeXrmEasy.Tests.Services.EntityInitializer +namespace FakeXrmEasy.Core.Tests.Services.EntityInitializer { public class InvoiceDetailInitializerServiceTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceInitializerServiceTests.cs b/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceInitializerServiceTests.cs index a4d5ae4d..8a4c98c0 100644 --- a/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceInitializerServiceTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Services/EntityInitializer/InvoiceInitializerServiceTests.cs @@ -5,7 +5,7 @@ using Xunit; using FakeXrmEasy.Services; -namespace FakeXrmEasy.Tests.Services.EntityInitializer +namespace FakeXrmEasy.Core.Tests.Services.EntityInitializer { public class InvoiceInitializerServiceTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/TestDefaultEntityInitializer.cs b/tests/FakeXrmEasy.Core.Tests/TestDefaultEntityInitializer.cs index f22cf3d1..b6a42a7c 100644 --- a/tests/FakeXrmEasy.Core.Tests/TestDefaultEntityInitializer.cs +++ b/tests/FakeXrmEasy.Core.Tests/TestDefaultEntityInitializer.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class TestDefaultEntityInitializer : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/Tracing/IXrmFakedTracingServiceTests.cs b/tests/FakeXrmEasy.Core.Tests/Tracing/IXrmFakedTracingServiceTests.cs index 69dc9ba6..6bd0bfd1 100644 --- a/tests/FakeXrmEasy.Core.Tests/Tracing/IXrmFakedTracingServiceTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/Tracing/IXrmFakedTracingServiceTests.cs @@ -2,7 +2,7 @@ using Xunit; -namespace FakeXrmEasy.Tests +namespace FakeXrmEasy.Core.Tests { public class XrmFakedTracingServiceTests : FakeXrmEasyTestsBase { diff --git a/tests/FakeXrmEasy.Core.Tests/XrmRealContextTests/XrmRealContextTests.cs b/tests/FakeXrmEasy.Core.Tests/XrmRealContextTests/XrmRealContextTests.cs index 724009b8..4944d4e3 100644 --- a/tests/FakeXrmEasy.Core.Tests/XrmRealContextTests/XrmRealContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/XrmRealContextTests/XrmRealContextTests.cs @@ -3,7 +3,7 @@ using System; using Xunit; -namespace FakeXrmEasy.Tests.XrmRealContextTests +namespace FakeXrmEasy.Core.Tests.XrmRealContextTests { public class XrmRealContextTests: FakeXrmEasyTestsBase { From 719496503c4edf7ff8e57f9c17ce9741611e03ab Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 02:39:29 +0200 Subject: [PATCH 02/10] Also upgrade Abstractions in test project --- .../FakeXrmEasy.Core.Tests.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj index f0f31b2a..950e9254 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj +++ b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj @@ -110,22 +110,22 @@ - + - + - + - + - + - + From 375f1185dd4a4d5075b1bf61f1c32677cb424613 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 21:55:19 +0200 Subject: [PATCH 03/10] Upgraded XrmTooling dependency, add DataverseEntities project to test FindReflectedTypes with multiple assemblies. --- FakeXrmEasy.Core.sln | 83 +- tests/DataverseEntities/Entities/account.cs | 3113 ++++++++++++++ tests/DataverseEntities/Entities/contact.cs | 3830 +++++++++++++++++ tests/DataverseEntities/Entities/task.cs | 961 +++++ .../DataverseEntities/EntityOptionSetEnum.cs | 61 + .../OptionSets/componentstate.cs | 37 + .../OptionSets/msft_datastate.cs | 28 + .../FakeContextTests/FakeContextTests.cs | 36 +- .../FakeXrmEasy.Core.Tests.csproj | 7 +- 9 files changed, 8116 insertions(+), 40 deletions(-) create mode 100644 tests/DataverseEntities/Entities/account.cs create mode 100644 tests/DataverseEntities/Entities/contact.cs create mode 100644 tests/DataverseEntities/Entities/task.cs create mode 100644 tests/DataverseEntities/EntityOptionSetEnum.cs create mode 100644 tests/DataverseEntities/OptionSets/componentstate.cs create mode 100644 tests/DataverseEntities/OptionSets/msft_datastate.cs diff --git a/FakeXrmEasy.Core.sln b/FakeXrmEasy.Core.sln index 182a84b0..a3d0300b 100644 --- a/FakeXrmEasy.Core.sln +++ b/FakeXrmEasy.Core.sln @@ -17,11 +17,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution build.ps1 = build.ps1 EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataverseEntities", "tests\DataverseEntities\DataverseEntities.csproj", "{7638E014-9149-4125-860F-D478CFD36C06}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 + FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU + FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64 + FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86 FAKE_XRM_EASY_2013|Any CPU = FAKE_XRM_EASY_2013|Any CPU FAKE_XRM_EASY_2013|x64 = FAKE_XRM_EASY_2013|x64 FAKE_XRM_EASY_2013|x86 = FAKE_XRM_EASY_2013|x86 @@ -34,23 +36,11 @@ Global FAKE_XRM_EASY_365|Any CPU = FAKE_XRM_EASY_365|Any CPU FAKE_XRM_EASY_365|x64 = FAKE_XRM_EASY_365|x64 FAKE_XRM_EASY_365|x86 = FAKE_XRM_EASY_365|x86 - FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU - FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64 - FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86 FAKE_XRM_EASY|Any CPU = FAKE_XRM_EASY|Any CPU FAKE_XRM_EASY|x64 = FAKE_XRM_EASY|x64 FAKE_XRM_EASY|x86 = FAKE_XRM_EASY|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|x64.ActiveCfg = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|x64.Build.0 = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|x86.ActiveCfg = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Debug|x86.Build.0 = Debug|Any CPU {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU @@ -87,18 +77,6 @@ Global {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY|x64.Build.0 = FAKE_XRM_EASY|Any CPU {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY|x86.ActiveCfg = FAKE_XRM_EASY|Any CPU {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY|x86.Build.0 = FAKE_XRM_EASY|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|Any CPU.Build.0 = Debug|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|x64.ActiveCfg = FAKE_XRM_EASY|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|x64.Build.0 = FAKE_XRM_EASY|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|x86.ActiveCfg = FAKE_XRM_EASY|Any CPU - {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.Release|x86.Build.0 = FAKE_XRM_EASY|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|x64.ActiveCfg = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|x64.Build.0 = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|x86.ActiveCfg = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Debug|x86.Build.0 = Debug|Any CPU {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU @@ -131,16 +109,46 @@ Global {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|Any CPU.ActiveCfg = FAKE_XRM_EASY|Any CPU {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|Any CPU.Build.0 = FAKE_XRM_EASY|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x64.Build.0 = FAKE_XRM_EASY_2013|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x86.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x86.Build.0 = FAKE_XRM_EASY_2013|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|Any CPU.Build.0 = Debug|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|x64.ActiveCfg = FAKE_XRM_EASY|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|x64.Build.0 = FAKE_XRM_EASY|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|x86.ActiveCfg = FAKE_XRM_EASY|Any CPU - {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.Release|x86.Build.0 = FAKE_XRM_EASY|Any CPU + {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x64.ActiveCfg = FAKE_XRM_EASY|Any CPU + {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x64.Build.0 = FAKE_XRM_EASY|Any CPU + {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x86.ActiveCfg = FAKE_XRM_EASY|Any CPU + {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8}.FAKE_XRM_EASY|x86.Build.0 = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|Any CPU.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|Any CPU.Build.0 = FAKE_XRM_EASY_9|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|Any CPU.ActiveCfg = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|Any CPU.Build.0 = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|x64.ActiveCfg = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|x64.Build.0 = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|x86.ActiveCfg = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY|x86.Build.0 = FAKE_XRM_EASY|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|x64.Build.0 = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|x86.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2013|x86.Build.0 = FAKE_XRM_EASY_2013|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|Any CPU.ActiveCfg = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|Any CPU.Build.0 = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|x64.ActiveCfg = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|x64.Build.0 = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|x86.ActiveCfg = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2015|x86.Build.0 = FAKE_XRM_EASY_2015|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|Any CPU.ActiveCfg = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|Any CPU.Build.0 = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|x64.ActiveCfg = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|x64.Build.0 = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|x86.ActiveCfg = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_2016|x86.Build.0 = FAKE_XRM_EASY_2016|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|Any CPU.ActiveCfg = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|Any CPU.Build.0 = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|x64.ActiveCfg = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|x64.Build.0 = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|x86.ActiveCfg = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_365|x86.Build.0 = FAKE_XRM_EASY_365|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|x64.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|x64.Build.0 = FAKE_XRM_EASY_9|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|x86.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {7638E014-9149-4125-860F-D478CFD36C06}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -148,6 +156,7 @@ Global GlobalSection(NestedProjects) = preSolution {CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE} = {6D8BD300-7945-4BD8-AFA5-30EEF1466332} {E7FD9BE3-5CD1-4B50-A23E-53EA1AE2EBB8} = {AB19E6BB-17E9-4489-B6C8-A14622C147D9} + {7638E014-9149-4125-860F-D478CFD36C06} = {AB19E6BB-17E9-4489-B6C8-A14622C147D9} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9E98B2F2-E752-4716-ABC6-BE9440866543} diff --git a/tests/DataverseEntities/Entities/account.cs b/tests/DataverseEntities/Entities/account.cs new file mode 100644 index 00000000..7d8cdb3d --- /dev/null +++ b/tests/DataverseEntities/Entities/account.cs @@ -0,0 +1,3113 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + /// + /// Drop-down list for selecting the category of the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_accountcategorycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + PreferredCustomer = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Standard = 2, + } + + /// + /// Drop-down list for classifying an account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_accountclassificationcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Drop-down list for selecting account ratings. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_accountratingcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Type of address for address 1, such as billing, shipping, or primary address. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address1_addresstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + BillTo = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + ShipTo = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Primary = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Other = 4, + } + + /// + /// Freight terms for address 1. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address1_freighttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + FOB = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + NoCharge = 2, + } + + /// + /// Method of shipment for address 1. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address1_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Airborne = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DHL = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + FedEx = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + UPS = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + PostalMail = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + FullLoad = 6, + + [System.Runtime.Serialization.EnumMemberAttribute()] + WillCall = 7, + } + + /// + /// Type of address for address 2, such as billing, shipping, or primary address. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address2_addresstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Freight terms for address 2. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address2_freighttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Method of shipment for address 2. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_address2_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Type of business associated with the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_businesstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Size of the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_customersizecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Type of the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_customertypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Competitor = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Consultant = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Customer = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Investor = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Partner = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Influencer = 6, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Press = 7, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Prospect = 8, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Reseller = 9, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Supplier = 10, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Vendor = 11, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Other = 12, + } + + /// + /// Type of industry with which the account is associated. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_industrycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Accounting = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + AgricultureandNonpetrolNaturalResourceExtraction = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + BroadcastingPrintingandPublishing = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Brokers = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + BuildingSupplyRetail = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + BusinessServices = 6, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Consulting = 7, + + [System.Runtime.Serialization.EnumMemberAttribute()] + ConsumerServices = 8, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DesignDirectionandCreativeManagement = 9, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DistributorsDispatchersandProcessors = 10, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DoctorsOfficesandClinics = 11, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DurableManufacturing = 12, + + [System.Runtime.Serialization.EnumMemberAttribute()] + EatingandDrinkingPlaces = 13, + + [System.Runtime.Serialization.EnumMemberAttribute()] + EntertainmentRetail = 14, + + [System.Runtime.Serialization.EnumMemberAttribute()] + EquipmentRentalandLeasing = 15, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Financial = 16, + + [System.Runtime.Serialization.EnumMemberAttribute()] + FoodandTobaccoProcessing = 17, + + [System.Runtime.Serialization.EnumMemberAttribute()] + InboundCapitalIntensiveProcessing = 18, + + [System.Runtime.Serialization.EnumMemberAttribute()] + InboundRepairandServices = 19, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Insurance = 20, + + [System.Runtime.Serialization.EnumMemberAttribute()] + LegalServices = 21, + + [System.Runtime.Serialization.EnumMemberAttribute()] + NonDurableMerchandiseRetail = 22, + + [System.Runtime.Serialization.EnumMemberAttribute()] + OutboundConsumerService = 23, + + [System.Runtime.Serialization.EnumMemberAttribute()] + PetrochemicalExtractionandDistribution = 24, + + [System.Runtime.Serialization.EnumMemberAttribute()] + ServiceRetail = 25, + + [System.Runtime.Serialization.EnumMemberAttribute()] + SIGAffiliations = 26, + + [System.Runtime.Serialization.EnumMemberAttribute()] + SocialServices = 27, + + [System.Runtime.Serialization.EnumMemberAttribute()] + SpecialOutboundTradeContractors = 28, + + [System.Runtime.Serialization.EnumMemberAttribute()] + SpecialtyRealty = 29, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Transportation = 30, + + [System.Runtime.Serialization.EnumMemberAttribute()] + UtilityCreationandDistribution = 31, + + [System.Runtime.Serialization.EnumMemberAttribute()] + VehicleRetail = 32, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Wholesale = 33, + } + + /// + /// Type of company ownership, such as public or private. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_ownershipcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Public = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Private = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Subsidiary = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Other = 4, + } + + /// + /// Payment terms for the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_paymenttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net30 = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + _210Net30 = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net45 = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net60 = 4, + } + + /// + /// Day of the week that the account prefers for scheduling service activities. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_preferredappointmentdaycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Sunday = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Monday = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Tuesday = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Wednesday = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Thursday = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Friday = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Saturday = 6, + } + + /// + /// Time of day that the account prefers for scheduling service activities. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_preferredappointmenttimecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Morning = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Afternoon = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Evening = 3, + } + + /// + /// Preferred contact method for the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_preferredcontactmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Any = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Email = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Phone = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Fax = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Mail = 5, + } + + /// + /// Method of shipment for the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Status of the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_statecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Active = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Inactive = 1, + } + + /// + /// Reason for the status of the account. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_statuscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Active = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Inactive = 2, + } + + /// + /// Territory to which the account belongs. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum account_territorycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 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.1.0.118")] + 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 string EntityLogicalCollectionName = "accounts"; + + public const string EntitySetName = "accounts"; + + 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 virtual account_accountcategorycode? AccountCategoryCode + { + get + { + return ((account_accountcategorycode?)(EntityOptionSetEnum.GetEnum(this, "accountcategorycode"))); + } + set + { + this.OnPropertyChanging("AccountCategoryCode"); + this.SetAttributeValue("accountcategorycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_accountclassificationcode? AccountClassificationCode + { + get + { + return ((account_accountclassificationcode?)(EntityOptionSetEnum.GetEnum(this, "accountclassificationcode"))); + } + set + { + this.OnPropertyChanging("AccountClassificationCode"); + this.SetAttributeValue("accountclassificationcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_accountratingcode? AccountRatingCode + { + get + { + return ((account_accountratingcode?)(EntityOptionSetEnum.GetEnum(this, "accountratingcode"))); + } + set + { + this.OnPropertyChanging("AccountRatingCode"); + this.SetAttributeValue("accountratingcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address1_addresstypecode? Address1_AddressTypeCode + { + get + { + return ((account_address1_addresstypecode?)(EntityOptionSetEnum.GetEnum(this, "address1_addresstypecode"))); + } + set + { + this.OnPropertyChanging("Address1_AddressTypeCode"); + this.SetAttributeValue("address1_addresstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address1_freighttermscode? Address1_FreightTermsCode + { + get + { + return ((account_address1_freighttermscode?)(EntityOptionSetEnum.GetEnum(this, "address1_freighttermscode"))); + } + set + { + this.OnPropertyChanging("Address1_FreightTermsCode"); + this.SetAttributeValue("address1_freighttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address1_shippingmethodcode? Address1_ShippingMethodCode + { + get + { + return ((account_address1_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "address1_shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("Address1_ShippingMethodCode"); + this.SetAttributeValue("address1_shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address2_addresstypecode? Address2_AddressTypeCode + { + get + { + return ((account_address2_addresstypecode?)(EntityOptionSetEnum.GetEnum(this, "address2_addresstypecode"))); + } + set + { + this.OnPropertyChanging("Address2_AddressTypeCode"); + this.SetAttributeValue("address2_addresstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address2_freighttermscode? Address2_FreightTermsCode + { + get + { + return ((account_address2_freighttermscode?)(EntityOptionSetEnum.GetEnum(this, "address2_freighttermscode"))); + } + set + { + this.OnPropertyChanging("Address2_FreightTermsCode"); + this.SetAttributeValue("address2_freighttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_address2_shippingmethodcode? Address2_ShippingMethodCode + { + get + { + return ((account_address2_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "address2_shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("Address2_ShippingMethodCode"); + this.SetAttributeValue("address2_shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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"); + } + } + + /// + /// Select the legal designation or other business type of the account for contracts or reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("businesstypecode")] + public virtual account_businesstypecode? BusinessTypeCode + { + get + { + return ((account_businesstypecode?)(EntityOptionSetEnum.GetEnum(this, "businesstypecode"))); + } + set + { + this.OnPropertyChanging("BusinessTypeCode"); + this.SetAttributeValue("businesstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_customersizecode? CustomerSizeCode + { + get + { + return ((account_customersizecode?)(EntityOptionSetEnum.GetEnum(this, "customersizecode"))); + } + set + { + this.OnPropertyChanging("CustomerSizeCode"); + this.SetAttributeValue("customersizecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("CustomerSizeCode"); + } + } + + /// + /// Select the category that best describes the relationship between the account and your organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customertypecode")] + public virtual account_customertypecode? CustomerTypeCode + { + get + { + return ((account_customertypecode?)(EntityOptionSetEnum.GetEnum(this, "customertypecode"))); + } + set + { + this.OnPropertyChanging("CustomerTypeCode"); + this.SetAttributeValue("customertypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("CustomerTypeCode"); + } + } + + /// + /// 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 virtual account_industrycode? IndustryCode + { + get + { + return ((account_industrycode?)(EntityOptionSetEnum.GetEnum(this, "industrycode"))); + } + set + { + this.OnPropertyChanging("IndustryCode"); + this.SetAttributeValue("industrycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("msft_datastate")] + public virtual msft_datastate? msft_DataState + { + get + { + return ((msft_datastate?)(EntityOptionSetEnum.GetEnum(this, "msft_datastate"))); + } + } + + /// + /// 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"); + } + } + + /// + /// 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 virtual account_ownershipcode? OwnershipCode + { + get + { + return ((account_ownershipcode?)(EntityOptionSetEnum.GetEnum(this, "ownershipcode"))); + } + set + { + this.OnPropertyChanging("OwnershipCode"); + this.SetAttributeValue("ownershipcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual account_paymenttermscode? PaymentTermsCode + { + get + { + return ((account_paymenttermscode?)(EntityOptionSetEnum.GetEnum(this, "paymenttermscode"))); + } + set + { + this.OnPropertyChanging("PaymentTermsCode"); + this.SetAttributeValue("paymenttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PaymentTermsCode"); + } + } + + /// + /// Select the preferred day of the week for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmentdaycode")] + public virtual account_preferredappointmentdaycode? PreferredAppointmentDayCode + { + get + { + return ((account_preferredappointmentdaycode?)(EntityOptionSetEnum.GetEnum(this, "preferredappointmentdaycode"))); + } + set + { + this.OnPropertyChanging("PreferredAppointmentDayCode"); + this.SetAttributeValue("preferredappointmentdaycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredAppointmentDayCode"); + } + } + + /// + /// Select the preferred time of day for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmenttimecode")] + public virtual account_preferredappointmenttimecode? PreferredAppointmentTimeCode + { + get + { + return ((account_preferredappointmenttimecode?)(EntityOptionSetEnum.GetEnum(this, "preferredappointmenttimecode"))); + } + set + { + this.OnPropertyChanging("PreferredAppointmentTimeCode"); + this.SetAttributeValue("preferredappointmenttimecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredAppointmentTimeCode"); + } + } + + /// + /// Select the preferred method of contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredcontactmethodcode")] + public virtual account_preferredcontactmethodcode? PreferredContactMethodCode + { + get + { + return ((account_preferredcontactmethodcode?)(EntityOptionSetEnum.GetEnum(this, "preferredcontactmethodcode"))); + } + set + { + this.OnPropertyChanging("PreferredContactMethodCode"); + this.SetAttributeValue("preferredcontactmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredContactMethodCode"); + } + } + + /// + /// 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"); + } + } + + /// + /// 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 virtual account_shippingmethodcode? ShippingMethodCode + { + get + { + return ((account_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("ShippingMethodCode"); + this.SetAttributeValue("shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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"); + } + } + + /// + /// Shows whether the account is active or inactive. Inactive accounts are read-only and can't be edited unless they are reactivated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")] + public virtual account_statecode? StateCode + { + get + { + return ((account_statecode?)(EntityOptionSetEnum.GetEnum(this, "statecode"))); + } + set + { + this.OnPropertyChanging("StateCode"); + this.SetAttributeValue("statecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StateCode"); + } + } + + /// + /// Select the account's status. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")] + public virtual account_statuscode? StatusCode + { + get + { + return ((account_statuscode?)(EntityOptionSetEnum.GetEnum(this, "statuscode"))); + } + set + { + this.OnPropertyChanging("StatusCode"); + this.SetAttributeValue("statuscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StatusCode"); + } + } + + /// + /// Type the stock exchange at which the account is listed to track their stock and financial performance of the company. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("stockexchange")] + public string StockExchange + { + get + { + return this.GetAttributeValue("stockexchange"); + } + set + { + this.OnPropertyChanging("StockExchange"); + this.SetAttributeValue("stockexchange", value); + this.OnPropertyChanged("StockExchange"); + } + } + + /// + /// Type the main phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone1")] + public string Telephone1 + { + get + { + return this.GetAttributeValue("telephone1"); + } + set + { + this.OnPropertyChanging("Telephone1"); + this.SetAttributeValue("telephone1", value); + this.OnPropertyChanged("Telephone1"); + } + } + + /// + /// Type a second phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone2")] + public string Telephone2 + { + get + { + return this.GetAttributeValue("telephone2"); + } + set + { + this.OnPropertyChanging("Telephone2"); + this.SetAttributeValue("telephone2", value); + this.OnPropertyChanged("Telephone2"); + } + } + + /// + /// Type a third phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone3")] + public string Telephone3 + { + get + { + return this.GetAttributeValue("telephone3"); + } + set + { + this.OnPropertyChanging("Telephone3"); + this.SetAttributeValue("telephone3", value); + this.OnPropertyChanged("Telephone3"); + } + } + + /// + /// Select a region or territory for the account for use in segmentation and analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("territorycode")] + public virtual account_territorycode? TerritoryCode + { + get + { + return ((account_territorycode?)(EntityOptionSetEnum.GetEnum(this, "territorycode"))); + } + set + { + this.OnPropertyChanging("TerritoryCode"); + this.SetAttributeValue("territorycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("TerritoryCode"); + } + } + + /// + /// Type the stock exchange symbol for the account to track financial performance of the company. You can click the code entered in this field to access the latest trading information from MSN Money. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("tickersymbol")] + public string TickerSymbol + { + get + { + return this.GetAttributeValue("tickersymbol"); + } + set + { + this.OnPropertyChanging("TickerSymbol"); + this.SetAttributeValue("tickersymbol", value); + this.OnPropertyChanged("TickerSymbol"); + } + } + + /// + /// Total time spent for emails (read and write) and meetings by me in relation to account record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timespentbymeonemailandmeetings")] + public string TimeSpentByMeOnEmailAndMeetings + { + get + { + return this.GetAttributeValue("timespentbymeonemailandmeetings"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")] + public System.Nullable TimeZoneRuleVersionNumber + { + get + { + return this.GetAttributeValue>("timezoneruleversionnumber"); + } + set + { + this.OnPropertyChanging("TimeZoneRuleVersionNumber"); + this.SetAttributeValue("timezoneruleversionnumber", value); + this.OnPropertyChanged("TimeZoneRuleVersionNumber"); + } + } + + /// + /// Choose the local currency for the record to make sure budgets are reported in the correct currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("transactioncurrencyid")] + public Microsoft.Xrm.Sdk.EntityReference TransactionCurrencyId + { + get + { + return this.GetAttributeValue("transactioncurrencyid"); + } + set + { + this.OnPropertyChanging("TransactionCurrencyId"); + this.SetAttributeValue("transactioncurrencyid", value); + this.OnPropertyChanged("TransactionCurrencyId"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("traversedpath")] + public string TraversedPath + { + get + { + return this.GetAttributeValue("traversedpath"); + } + set + { + this.OnPropertyChanging("TraversedPath"); + this.SetAttributeValue("traversedpath", value); + this.OnPropertyChanged("TraversedPath"); + } + } + + /// + /// Time zone code that was in use when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")] + public System.Nullable UTCConversionTimeZoneCode + { + get + { + return this.GetAttributeValue>("utcconversiontimezonecode"); + } + set + { + this.OnPropertyChanging("UTCConversionTimeZoneCode"); + this.SetAttributeValue("utcconversiontimezonecode", value); + this.OnPropertyChanged("UTCConversionTimeZoneCode"); + } + } + + /// + /// Version number of the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// Type the account's website URL to get quick details about the company profile. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("websiteurl")] + public string WebSiteURL + { + get + { + return this.GetAttributeValue("websiteurl"); + } + set + { + this.OnPropertyChanging("WebSiteURL"); + this.SetAttributeValue("websiteurl", value); + this.OnPropertyChanged("WebSiteURL"); + } + } + + /// + /// Type the phonetic spelling of the company name, if specified in Japanese, to make sure the name is pronounced correctly in phone calls and other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yominame")] + public string YomiName + { + get + { + return this.GetAttributeValue("yominame"); + } + set + { + this.OnPropertyChanging("YomiName"); + this.SetAttributeValue("yominame", value); + this.OnPropertyChanged("YomiName"); + } + } + + /// + /// 1:N account_master_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedaccount_master_account + { + get + { + return this.GetRelatedEntities("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedaccount_master_account"); + this.SetRelatedEntities("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedaccount_master_account"); + } + } + + /// + /// 1:N account_parent_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedaccount_parent_account + { + get + { + return this.GetRelatedEntities("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedaccount_parent_account"); + this.SetRelatedEntities("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedaccount_parent_account"); + } + } + + /// + /// 1:N Account_Tasks + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Tasks")] + public System.Collections.Generic.IEnumerable Account_Tasks + { + get + { + return this.GetRelatedEntities("Account_Tasks", null); + } + set + { + this.OnPropertyChanging("Account_Tasks"); + this.SetRelatedEntities("Account_Tasks", null, value); + this.OnPropertyChanged("Account_Tasks"); + } + } + + /// + /// 1:N contact_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_customer_accounts")] + public System.Collections.Generic.IEnumerable contact_customer_accounts + { + get + { + return this.GetRelatedEntities("contact_customer_accounts", null); + } + set + { + this.OnPropertyChanging("contact_customer_accounts"); + this.SetRelatedEntities("contact_customer_accounts", null, value); + this.OnPropertyChanged("contact_customer_accounts"); + } + } + + /// + /// N:1 account_master_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public DataverseEntities.Account Referencingaccount_master_account + { + get + { + return this.GetRelatedEntity("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + } + + /// + /// N:1 account_parent_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentaccountid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public DataverseEntities.Account Referencingaccount_parent_account + { + get + { + return this.GetRelatedEntity("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + set + { + this.OnPropertyChanging("Referencingaccount_parent_account"); + this.SetRelatedEntity("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing, value); + this.OnPropertyChanged("Referencingaccount_parent_account"); + } + } + + /// + /// N:1 account_primary_contact + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarycontactid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_primary_contact")] + public DataverseEntities.Contact account_primary_contact + { + get + { + return this.GetRelatedEntity("account_primary_contact", null); + } + set + { + this.OnPropertyChanging("account_primary_contact"); + this.SetRelatedEntity("account_primary_contact", null, value); + this.OnPropertyChanged("account_primary_contact"); + } + } + } +} +#pragma warning restore CS1591 diff --git a/tests/DataverseEntities/Entities/contact.cs b/tests/DataverseEntities/Entities/contact.cs new file mode 100644 index 00000000..7a3c347c --- /dev/null +++ b/tests/DataverseEntities/Entities/contact.cs @@ -0,0 +1,3830 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + /// + /// Account role of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_accountrolecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DecisionMaker = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Employee = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Influencer = 3, + } + + /// + /// Type of address for address 1, such as billing, shipping, or primary address. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address1_addresstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + BillTo = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + ShipTo = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Primary = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Other = 4, + } + + /// + /// Freight terms for address 1. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address1_freighttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + FOB = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + NoCharge = 2, + } + + /// + /// Method of shipment for address 1. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address1_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Airborne = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DHL = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + FedEx = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + UPS = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + PostalMail = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + FullLoad = 6, + + [System.Runtime.Serialization.EnumMemberAttribute()] + WillCall = 7, + } + + /// + /// Type of address for address 2, such as billing, shipping, or primary address. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address2_addresstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Freight terms for address 2. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address2_freighttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Method of shipment for address 2. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address2_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Type of address for address 3, such as billing, shipping, or primary address. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address3_addresstypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Freight terms for address 3. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address3_freighttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Method of shipment for address 3. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_address3_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Size of the contact's business. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_customersizecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Type of business associated with the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_customertypecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Formal education level that the contact has attained. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_educationcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Marital status of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_familystatuscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Single = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Married = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Divorced = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Widowed = 4, + } + + /// + /// Gender of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_gendercode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Male = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Female = 2, + } + + /// + /// Information about whether the contact has children. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_haschildrencode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Source of the lead of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_leadsourcecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Payment terms for the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_paymenttermscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net30 = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + _210Net30 = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net45 = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Net60 = 4, + } + + /// + /// Day of the week that the contact prefers for scheduling service activities. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_preferredappointmentdaycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Sunday = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Monday = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Tuesday = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Wednesday = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Thursday = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Friday = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Saturday = 6, + } + + /// + /// Time of day that the contact prefers for scheduling service activities. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_preferredappointmenttimecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Morning = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Afternoon = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Evening = 3, + } + + /// + /// Preferred contact method for the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_preferredcontactmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Any = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Email = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Phone = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Fax = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Mail = 5, + } + + /// + /// Method of shipping for the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_shippingmethodcode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Status of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_statecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Active = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Inactive = 1, + } + + /// + /// Reason for the status of the contact. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_statuscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Active = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Inactive = 2, + } + + /// + /// Unique identifier of the territory to which the contact is assigned. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum contact_territorycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + DefaultValue = 1, + } + + /// + /// Person with whom a business unit has a relationship, such as customer, supplier, and colleague. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("contact")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public partial class Contact : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged + { + + /// + /// Default Constructor. + /// + public Contact() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "contact"; + + public const string EntityLogicalCollectionName = "contacts"; + + public const string EntitySetName = "contacts"; + + public const int EntityTypeCode = 2; + + 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)); + } + } + + /// + /// Unique identifier of the account with which the contact is associated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public Microsoft.Xrm.Sdk.EntityReference AccountId + { + get + { + return this.GetAttributeValue("accountid"); + } + } + + /// + /// Select the contact's role within the company or sales process, such as decision maker, employee, or influencer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountrolecode")] + public virtual contact_accountrolecode? AccountRoleCode + { + get + { + return ((contact_accountrolecode?)(EntityOptionSetEnum.GetEnum(this, "accountrolecode"))); + } + set + { + this.OnPropertyChanging("AccountRoleCode"); + this.SetAttributeValue("accountrolecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("AccountRoleCode"); + } + } + + /// + /// 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 virtual contact_address1_addresstypecode? Address1_AddressTypeCode + { + get + { + return ((contact_address1_addresstypecode?)(EntityOptionSetEnum.GetEnum(this, "address1_addresstypecode"))); + } + set + { + this.OnPropertyChanging("Address1_AddressTypeCode"); + this.SetAttributeValue("address1_addresstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual contact_address1_freighttermscode? Address1_FreightTermsCode + { + get + { + return ((contact_address1_freighttermscode?)(EntityOptionSetEnum.GetEnum(this, "address1_freighttermscode"))); + } + set + { + this.OnPropertyChanging("Address1_FreightTermsCode"); + this.SetAttributeValue("address1_freighttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual contact_address1_shippingmethodcode? Address1_ShippingMethodCode + { + get + { + return ((contact_address1_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "address1_shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("Address1_ShippingMethodCode"); + this.SetAttributeValue("address1_shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual contact_address2_addresstypecode? Address2_AddressTypeCode + { + get + { + return ((contact_address2_addresstypecode?)(EntityOptionSetEnum.GetEnum(this, "address2_addresstypecode"))); + } + set + { + this.OnPropertyChanging("Address2_AddressTypeCode"); + this.SetAttributeValue("address2_addresstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual contact_address2_freighttermscode? Address2_FreightTermsCode + { + get + { + return ((contact_address2_freighttermscode?)(EntityOptionSetEnum.GetEnum(this, "address2_freighttermscode"))); + } + set + { + this.OnPropertyChanging("Address2_FreightTermsCode"); + this.SetAttributeValue("address2_freighttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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 virtual contact_address2_shippingmethodcode? Address2_ShippingMethodCode + { + get + { + return ((contact_address2_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "address2_shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("Address2_ShippingMethodCode"); + this.SetAttributeValue("address2_shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + 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"); + } + } + + /// + /// Unique identifier for address 3. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_addressid")] + public System.Nullable Address3_AddressId + { + get + { + return this.GetAttributeValue>("address3_addressid"); + } + set + { + this.OnPropertyChanging("Address3_AddressId"); + this.SetAttributeValue("address3_addressid", value); + this.OnPropertyChanged("Address3_AddressId"); + } + } + + /// + /// Select the third address type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_addresstypecode")] + public virtual contact_address3_addresstypecode? Address3_AddressTypeCode + { + get + { + return ((contact_address3_addresstypecode?)(EntityOptionSetEnum.GetEnum(this, "address3_addresstypecode"))); + } + set + { + this.OnPropertyChanging("Address3_AddressTypeCode"); + this.SetAttributeValue("address3_addresstypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("Address3_AddressTypeCode"); + } + } + + /// + /// Type the city for the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_city")] + public string Address3_City + { + get + { + return this.GetAttributeValue("address3_city"); + } + set + { + this.OnPropertyChanging("Address3_City"); + this.SetAttributeValue("address3_city", value); + this.OnPropertyChanged("Address3_City"); + } + } + + /// + /// Shows the complete third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_composite")] + public string Address3_Composite + { + get + { + return this.GetAttributeValue("address3_composite"); + } + } + + /// + /// the country or region for the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_country")] + public string Address3_Country + { + get + { + return this.GetAttributeValue("address3_country"); + } + set + { + this.OnPropertyChanging("Address3_Country"); + this.SetAttributeValue("address3_country", value); + this.OnPropertyChanged("Address3_Country"); + } + } + + /// + /// Type the county for the third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_county")] + public string Address3_County + { + get + { + return this.GetAttributeValue("address3_county"); + } + set + { + this.OnPropertyChanging("Address3_County"); + this.SetAttributeValue("address3_county", value); + this.OnPropertyChanged("Address3_County"); + } + } + + /// + /// Type the fax number associated with the third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_fax")] + public string Address3_Fax + { + get + { + return this.GetAttributeValue("address3_fax"); + } + set + { + this.OnPropertyChanging("Address3_Fax"); + this.SetAttributeValue("address3_fax", value); + this.OnPropertyChanged("Address3_Fax"); + } + } + + /// + /// Select the freight terms for the third address to make sure shipping orders are processed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_freighttermscode")] + public virtual contact_address3_freighttermscode? Address3_FreightTermsCode + { + get + { + return ((contact_address3_freighttermscode?)(EntityOptionSetEnum.GetEnum(this, "address3_freighttermscode"))); + } + set + { + this.OnPropertyChanging("Address3_FreightTermsCode"); + this.SetAttributeValue("address3_freighttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("Address3_FreightTermsCode"); + } + } + + /// + /// Type the latitude value for the third address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_latitude")] + public System.Nullable Address3_Latitude + { + get + { + return this.GetAttributeValue>("address3_latitude"); + } + set + { + this.OnPropertyChanging("Address3_Latitude"); + this.SetAttributeValue("address3_latitude", value); + this.OnPropertyChanged("Address3_Latitude"); + } + } + + /// + /// the first line of the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_line1")] + public string Address3_Line1 + { + get + { + return this.GetAttributeValue("address3_line1"); + } + set + { + this.OnPropertyChanging("Address3_Line1"); + this.SetAttributeValue("address3_line1", value); + this.OnPropertyChanged("Address3_Line1"); + } + } + + /// + /// the second line of the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_line2")] + public string Address3_Line2 + { + get + { + return this.GetAttributeValue("address3_line2"); + } + set + { + this.OnPropertyChanging("Address3_Line2"); + this.SetAttributeValue("address3_line2", value); + this.OnPropertyChanged("Address3_Line2"); + } + } + + /// + /// the third line of the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_line3")] + public string Address3_Line3 + { + get + { + return this.GetAttributeValue("address3_line3"); + } + set + { + this.OnPropertyChanging("Address3_Line3"); + this.SetAttributeValue("address3_line3", value); + this.OnPropertyChanged("Address3_Line3"); + } + } + + /// + /// Type the longitude value for the third address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_longitude")] + public System.Nullable Address3_Longitude + { + get + { + return this.GetAttributeValue>("address3_longitude"); + } + set + { + this.OnPropertyChanging("Address3_Longitude"); + this.SetAttributeValue("address3_longitude", value); + this.OnPropertyChanged("Address3_Longitude"); + } + } + + /// + /// Type a descriptive name for the third address, such as Corporate Headquarters. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_name")] + public string Address3_Name + { + get + { + return this.GetAttributeValue("address3_name"); + } + set + { + this.OnPropertyChanging("Address3_Name"); + this.SetAttributeValue("address3_name", value); + this.OnPropertyChanged("Address3_Name"); + } + } + + /// + /// the ZIP Code or postal code for the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_postalcode")] + public string Address3_PostalCode + { + get + { + return this.GetAttributeValue("address3_postalcode"); + } + set + { + this.OnPropertyChanging("Address3_PostalCode"); + this.SetAttributeValue("address3_postalcode", value); + this.OnPropertyChanged("Address3_PostalCode"); + } + } + + /// + /// the post office box number of the 3rd address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_postofficebox")] + public string Address3_PostOfficeBox + { + get + { + return this.GetAttributeValue("address3_postofficebox"); + } + set + { + this.OnPropertyChanging("Address3_PostOfficeBox"); + this.SetAttributeValue("address3_postofficebox", value); + this.OnPropertyChanged("Address3_PostOfficeBox"); + } + } + + /// + /// Type the name of the main contact at the account's third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_primarycontactname")] + public string Address3_PrimaryContactName + { + get + { + return this.GetAttributeValue("address3_primarycontactname"); + } + set + { + this.OnPropertyChanging("Address3_PrimaryContactName"); + this.SetAttributeValue("address3_primarycontactname", value); + this.OnPropertyChanged("Address3_PrimaryContactName"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_shippingmethodcode")] + public virtual contact_address3_shippingmethodcode? Address3_ShippingMethodCode + { + get + { + return ((contact_address3_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "address3_shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("Address3_ShippingMethodCode"); + this.SetAttributeValue("address3_shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("Address3_ShippingMethodCode"); + } + } + + /// + /// the state or province of the third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_stateorprovince")] + public string Address3_StateOrProvince + { + get + { + return this.GetAttributeValue("address3_stateorprovince"); + } + set + { + this.OnPropertyChanging("Address3_StateOrProvince"); + this.SetAttributeValue("address3_stateorprovince", value); + this.OnPropertyChanged("Address3_StateOrProvince"); + } + } + + /// + /// Type the main phone number associated with the third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_telephone1")] + public string Address3_Telephone1 + { + get + { + return this.GetAttributeValue("address3_telephone1"); + } + set + { + this.OnPropertyChanging("Address3_Telephone1"); + this.SetAttributeValue("address3_telephone1", value); + this.OnPropertyChanged("Address3_Telephone1"); + } + } + + /// + /// Type a second phone number associated with the third address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_telephone2")] + public string Address3_Telephone2 + { + get + { + return this.GetAttributeValue("address3_telephone2"); + } + set + { + this.OnPropertyChanging("Address3_Telephone2"); + this.SetAttributeValue("address3_telephone2", value); + this.OnPropertyChanged("Address3_Telephone2"); + } + } + + /// + /// Type a third phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_telephone3")] + public string Address3_Telephone3 + { + get + { + return this.GetAttributeValue("address3_telephone3"); + } + set + { + this.OnPropertyChanging("Address3_Telephone3"); + this.SetAttributeValue("address3_telephone3", value); + this.OnPropertyChanged("Address3_Telephone3"); + } + } + + /// + /// Type the UPS zone of the third address to make sure shipping charges are calculated correctly and deliveries are made promptly, if shipped by UPS. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address3_upszone")] + public string Address3_UPSZone + { + get + { + return this.GetAttributeValue("address3_upszone"); + } + set + { + this.OnPropertyChanging("Address3_UPSZone"); + this.SetAttributeValue("address3_upszone", value); + this.OnPropertyChanged("Address3_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("address3_utcoffset")] + public System.Nullable Address3_UTCOffset + { + get + { + return this.GetAttributeValue>("address3_utcoffset"); + } + set + { + this.OnPropertyChanging("Address3_UTCOffset"); + this.SetAttributeValue("address3_utcoffset", value); + this.OnPropertyChanged("Address3_UTCOffset"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging30")] + public Microsoft.Xrm.Sdk.Money Aging30 + { + get + { + return this.GetAttributeValue("aging30"); + } + } + + /// + /// Shows the Aging 30 field converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [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"); + } + } + + /// + /// Shows the Aging 60 field converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [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"); + } + } + + /// + /// Shows the Aging 90 field converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging90_base")] + public Microsoft.Xrm.Sdk.Money Aging90_Base + { + get + { + return this.GetAttributeValue("aging90_base"); + } + } + + /// + /// Enter the date of the contact's wedding or service anniversary for use in customer gift programs or other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("anniversary")] + public System.Nullable Anniversary + { + get + { + return this.GetAttributeValue>("anniversary"); + } + set + { + this.OnPropertyChanging("Anniversary"); + this.SetAttributeValue("anniversary", value); + this.OnPropertyChanged("Anniversary"); + } + } + + /// + /// Type the contact's annual income for use in profiling and financial analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("annualincome")] + public Microsoft.Xrm.Sdk.Money AnnualIncome + { + get + { + return this.GetAttributeValue("annualincome"); + } + set + { + this.OnPropertyChanging("AnnualIncome"); + this.SetAttributeValue("annualincome", value); + this.OnPropertyChanged("AnnualIncome"); + } + } + + /// + /// Shows the Annual Income field converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("annualincome_base")] + public Microsoft.Xrm.Sdk.Money AnnualIncome_Base + { + get + { + return this.GetAttributeValue("annualincome_base"); + } + } + + /// + /// Type the name of the contact's assistant. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("assistantname")] + public string AssistantName + { + get + { + return this.GetAttributeValue("assistantname"); + } + set + { + this.OnPropertyChanging("AssistantName"); + this.SetAttributeValue("assistantname", value); + this.OnPropertyChanged("AssistantName"); + } + } + + /// + /// Type the phone number for the contact's assistant. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("assistantphone")] + public string AssistantPhone + { + get + { + return this.GetAttributeValue("assistantphone"); + } + set + { + this.OnPropertyChanging("AssistantPhone"); + this.SetAttributeValue("assistantphone", value); + this.OnPropertyChanged("AssistantPhone"); + } + } + + /// + /// Enter the contact's birthday for use in customer gift programs or other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("birthdate")] + public System.Nullable BirthDate + { + get + { + return this.GetAttributeValue>("birthdate"); + } + set + { + this.OnPropertyChanging("BirthDate"); + this.SetAttributeValue("birthdate", value); + this.OnPropertyChanged("BirthDate"); + } + } + + /// + /// Type a second business phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("business2")] + public string Business2 + { + get + { + return this.GetAttributeValue("business2"); + } + set + { + this.OnPropertyChanging("Business2"); + this.SetAttributeValue("business2", value); + this.OnPropertyChanged("Business2"); + } + } + + /// + /// Type a callback phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("callback")] + public string Callback + { + get + { + return this.GetAttributeValue("callback"); + } + set + { + this.OnPropertyChanging("Callback"); + this.SetAttributeValue("callback", value); + this.OnPropertyChanged("Callback"); + } + } + + /// + /// Type the names of the contact's children for reference in communications and client programs. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("childrensnames")] + public string ChildrensNames + { + get + { + return this.GetAttributeValue("childrensnames"); + } + set + { + this.OnPropertyChanging("ChildrensNames"); + this.SetAttributeValue("childrensnames", value); + this.OnPropertyChanged("ChildrensNames"); + } + } + + /// + /// Type the company phone of the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("company")] + public string Company + { + get + { + return this.GetAttributeValue("company"); + } + set + { + this.OnPropertyChanging("Company"); + this.SetAttributeValue("company", value); + this.OnPropertyChanged("Company"); + } + } + + /// + /// Unique identifier of the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("contactid")] + public System.Nullable ContactId + { + get + { + return this.GetAttributeValue>("contactid"); + } + set + { + this.OnPropertyChanging("ContactId"); + this.SetAttributeValue("contactid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("ContactId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("contactid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.ContactId = value; + } + } + + /// + /// 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 contact for 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 field converted to the system's default base currency for reporting purposes. The calculations use the exchange rate specified in the Currencies area. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditlimit_base")] + public Microsoft.Xrm.Sdk.Money CreditLimit_Base + { + get + { + return this.GetAttributeValue("creditlimit_base"); + } + } + + /// + /// Select whether the contact is on a credit hold, for reference when addressing invoice and accounting issues. + /// + [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 of the contact's company for segmentation and reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customersizecode")] + public virtual contact_customersizecode? CustomerSizeCode + { + get + { + return ((contact_customersizecode?)(EntityOptionSetEnum.GetEnum(this, "customersizecode"))); + } + set + { + this.OnPropertyChanging("CustomerSizeCode"); + this.SetAttributeValue("customersizecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("CustomerSizeCode"); + } + } + + /// + /// Select the category that best describes the relationship between the contact and your organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customertypecode")] + public virtual contact_customertypecode? CustomerTypeCode + { + get + { + return ((contact_customertypecode?)(EntityOptionSetEnum.GetEnum(this, "customertypecode"))); + } + set + { + this.OnPropertyChanging("CustomerTypeCode"); + this.SetAttributeValue("customertypecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("CustomerTypeCode"); + } + } + + /// + /// Type the department or business unit where the contact works in the parent company or business. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("department")] + public string Department + { + get + { + return this.GetAttributeValue("department"); + } + set + { + this.OnPropertyChanging("Department"); + this.SetAttributeValue("department", value); + this.OnPropertyChanged("Department"); + } + } + + /// + /// Type additional information to describe the contact, 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 contact accepts bulk email sent through marketing campaigns or quick campaigns. If Do Not Allow is selected, the contact can be added to marketing lists, but will be excluded from the 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 contact accepts bulk postal mail sent through marketing campaigns or quick campaigns. If Do Not Allow is selected, the contact can be added to marketing lists, but will be excluded from the letters. + /// + [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 contact allows direct email sent from Microsoft Dynamics 365. If Do Not Allow is selected, Microsoft Dynamics 365 will not send the email. + /// + [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 contact allows faxes. If Do Not Allow is selected, the contact will be excluded from any 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 contact accepts phone calls. If Do Not Allow is selected, the contact will be excluded from any 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 contact allows direct mail. If Do Not Allow is selected, the contact 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 contact accepts marketing materials, such as brochures or catalogs. Contacts that opt out can be excluded from marketing initiatives. + /// + [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"); + } + } + + /// + /// Select the contact's highest level of education for use in segmentation and analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("educationcode")] + public virtual contact_educationcode? EducationCode + { + get + { + return ((contact_educationcode?)(EntityOptionSetEnum.GetEnum(this, "educationcode"))); + } + set + { + this.OnPropertyChanging("EducationCode"); + this.SetAttributeValue("educationcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("EducationCode"); + } + } + + /// + /// Type the primary email address for the contact. + /// + [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 contact. + /// + [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 contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress3")] + public string EMailAddress3 + { + get + { + return this.GetAttributeValue("emailaddress3"); + } + set + { + this.OnPropertyChanging("EMailAddress3"); + this.SetAttributeValue("emailaddress3", value); + this.OnPropertyChanged("EMailAddress3"); + } + } + + /// + /// Type the employee ID or number for the contact for reference in orders, service cases, or other communications with the contact's organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("employeeid")] + public string EmployeeId + { + get + { + return this.GetAttributeValue("employeeid"); + } + set + { + this.OnPropertyChanging("EmployeeId"); + this.SetAttributeValue("employeeid", value); + this.OnPropertyChanged("EmployeeId"); + } + } + + /// + /// 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"); + } + } + + /// + /// Identifier for an external user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("externaluseridentifier")] + public string ExternalUserIdentifier + { + get + { + return this.GetAttributeValue("externaluseridentifier"); + } + set + { + this.OnPropertyChanging("ExternalUserIdentifier"); + this.SetAttributeValue("externaluseridentifier", value); + this.OnPropertyChanged("ExternalUserIdentifier"); + } + } + + /// + /// Select the marital status of the contact for reference in follow-up phone calls and other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("familystatuscode")] + public virtual contact_familystatuscode? FamilyStatusCode + { + get + { + return ((contact_familystatuscode?)(EntityOptionSetEnum.GetEnum(this, "familystatuscode"))); + } + set + { + this.OnPropertyChanging("FamilyStatusCode"); + this.SetAttributeValue("familystatuscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("FamilyStatusCode"); + } + } + + /// + /// Type the fax number for the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("fax")] + public string Fax + { + get + { + return this.GetAttributeValue("fax"); + } + set + { + this.OnPropertyChanging("Fax"); + this.SetAttributeValue("fax", value); + this.OnPropertyChanged("Fax"); + } + } + + /// + /// Type the contact's first name to make sure the contact is addressed correctly in sales calls, email, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("firstname")] + public string FirstName + { + get + { + return this.GetAttributeValue("firstname"); + } + set + { + this.OnPropertyChanging("FirstName"); + this.SetAttributeValue("firstname", value); + this.OnPropertyChanged("FirstName"); + } + } + + /// + /// Information about whether to allow following email activity like opens, attachment views and link clicks for emails sent to the contact. + /// + [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 contact'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"); + } + } + + /// + /// Combines and shows the contact's first and last names so that the full name can be displayed in views and reports. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("fullname")] + public string FullName + { + get + { + return this.GetAttributeValue("fullname"); + } + } + + /// + /// Select the contact's gender to make sure the contact is addressed correctly in sales calls, email, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("gendercode")] + public virtual contact_gendercode? GenderCode + { + get + { + return ((contact_gendercode?)(EntityOptionSetEnum.GetEnum(this, "gendercode"))); + } + set + { + this.OnPropertyChanging("GenderCode"); + this.SetAttributeValue("gendercode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("GenderCode"); + } + } + + /// + /// Type the passport number or other government ID for the contact for use in documents or reports. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("governmentid")] + public string GovernmentId + { + get + { + return this.GetAttributeValue("governmentid"); + } + set + { + this.OnPropertyChanging("GovernmentId"); + this.SetAttributeValue("governmentid", value); + this.OnPropertyChanged("GovernmentId"); + } + } + + /// + /// Select whether the contact has any children for reference in follow-up phone calls and other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("haschildrencode")] + public virtual contact_haschildrencode? HasChildrenCode + { + get + { + return ((contact_haschildrencode?)(EntityOptionSetEnum.GetEnum(this, "haschildrencode"))); + } + set + { + this.OnPropertyChanging("HasChildrenCode"); + this.SetAttributeValue("haschildrencode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("HasChildrenCode"); + } + } + + /// + /// Type a second home phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("home2")] + public string Home2 + { + get + { + return this.GetAttributeValue("home2"); + } + set + { + this.OnPropertyChanging("Home2"); + this.SetAttributeValue("home2", value); + this.OnPropertyChanged("Home2"); + } + } + + /// + /// 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 whether the contact exists in a separate accounting or other system, such as Microsoft Dynamics GP or another ERP database, for use in integration processes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("isbackofficecustomer")] + public System.Nullable IsBackofficeCustomer + { + get + { + return this.GetAttributeValue>("isbackofficecustomer"); + } + set + { + this.OnPropertyChanging("IsBackofficeCustomer"); + this.SetAttributeValue("isbackofficecustomer", value); + this.OnPropertyChanged("IsBackofficeCustomer"); + } + } + + /// + /// Type the job title of the contact to make sure the contact is addressed correctly in sales calls, email, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("jobtitle")] + public string JobTitle + { + get + { + return this.GetAttributeValue("jobtitle"); + } + set + { + this.OnPropertyChanging("JobTitle"); + this.SetAttributeValue("jobtitle", value); + this.OnPropertyChanged("JobTitle"); + } + } + + /// + /// Type the contact's last name to make sure the contact is addressed correctly in sales calls, email, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("lastname")] + public string LastName + { + get + { + return this.GetAttributeValue("lastname"); + } + set + { + this.OnPropertyChanging("LastName"); + this.SetAttributeValue("lastname", value); + this.OnPropertyChanged("LastName"); + } + } + + /// + /// 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 contact 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"); + } + } + + /// + /// Select the primary marketing source that directed the contact to your organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("leadsourcecode")] + public virtual contact_leadsourcecode? LeadSourceCode + { + get + { + return ((contact_leadsourcecode?)(EntityOptionSetEnum.GetEnum(this, "leadsourcecode"))); + } + set + { + this.OnPropertyChanging("LeadSourceCode"); + this.SetAttributeValue("leadsourcecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("LeadSourceCode"); + } + } + + /// + /// Type the name of the contact's manager for use in escalating issues or other follow-up communications with the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("managername")] + public string ManagerName + { + get + { + return this.GetAttributeValue("managername"); + } + set + { + this.OnPropertyChanging("ManagerName"); + this.SetAttributeValue("managername", value); + this.OnPropertyChanged("ManagerName"); + } + } + + /// + /// Type the phone number for the contact's manager. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("managerphone")] + public string ManagerPhone + { + get + { + return this.GetAttributeValue("managerphone"); + } + set + { + this.OnPropertyChanging("ManagerPhone"); + this.SetAttributeValue("managerphone", value); + this.OnPropertyChanged("ManagerPhone"); + } + } + + /// + /// 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"); + } + } + + /// + /// Unique identifier of the master contact for merge. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + public Microsoft.Xrm.Sdk.EntityReference MasterId + { + get + { + return this.GetAttributeValue("masterid"); + } + } + + /// + /// Shows whether the account has been merged with a master contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("merged")] + public System.Nullable Merged + { + get + { + return this.GetAttributeValue>("merged"); + } + } + + /// + /// Type the contact's middle name or initial to make sure the contact is addressed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("middlename")] + public string MiddleName + { + get + { + return this.GetAttributeValue("middlename"); + } + set + { + this.OnPropertyChanging("MiddleName"); + this.SetAttributeValue("middlename", value); + this.OnPropertyChanged("MiddleName"); + } + } + + /// + /// Type the mobile phone number for the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("mobilephone")] + public string MobilePhone + { + get + { + return this.GetAttributeValue("mobilephone"); + } + set + { + this.OnPropertyChanging("MobilePhone"); + this.SetAttributeValue("mobilephone", value); + this.OnPropertyChanged("MobilePhone"); + } + } + + /// + /// 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 last updated the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedOnBehalfBy + { + get + { + return this.GetAttributeValue("modifiedonbehalfby"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("msft_datastate")] + public virtual msft_datastate? msft_DataState + { + get + { + return ((msft_datastate?)(EntityOptionSetEnum.GetEnum(this, "msft_datastate"))); + } + } + + /// + /// Type the contact's nickname. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("nickname")] + public string NickName + { + get + { + return this.GetAttributeValue("nickname"); + } + set + { + this.OnPropertyChanging("NickName"); + this.SetAttributeValue("nickname", value); + this.OnPropertyChanged("NickName"); + } + } + + /// + /// Type the number of children the contact has for reference in follow-up phone calls and other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("numberofchildren")] + public System.Nullable NumberOfChildren + { + get + { + return this.GetAttributeValue>("numberofchildren"); + } + set + { + this.OnPropertyChanging("NumberOfChildren"); + this.SetAttributeValue("numberofchildren", value); + this.OnPropertyChanged("NumberOfChildren"); + } + } + + /// + /// 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"); + } + } + + /// + /// 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"); + } + } + + /// + /// Unique identifier of the business unit that owns the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference OwningBusinessUnit + { + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the team who owns the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + public Microsoft.Xrm.Sdk.EntityReference OwningTeam + { + get + { + return this.GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier of the user who owns the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference OwningUser + { + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Type the pager number for the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("pager")] + public string Pager + { + get + { + return this.GetAttributeValue("pager"); + } + set + { + this.OnPropertyChanging("Pager"); + this.SetAttributeValue("pager", value); + this.OnPropertyChanged("Pager"); + } + } + + /// + /// Unique identifier of the parent contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentcontactid")] + public Microsoft.Xrm.Sdk.EntityReference ParentContactId + { + get + { + return this.GetAttributeValue("parentcontactid"); + } + } + + /// + /// Select the parent account or parent contact for the contact to provide a quick link to additional details, such as financial information, activities, and opportunities. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentcustomerid")] + public Microsoft.Xrm.Sdk.EntityReference ParentCustomerId + { + get + { + return this.GetAttributeValue("parentcustomerid"); + } + set + { + this.OnPropertyChanging("ParentCustomerId"); + this.SetAttributeValue("parentcustomerid", value); + this.OnPropertyChanged("ParentCustomerId"); + } + } + + /// + /// Shows whether the contact participates in workflow rules. + /// + [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 virtual contact_paymenttermscode? PaymentTermsCode + { + get + { + return ((contact_paymenttermscode?)(EntityOptionSetEnum.GetEnum(this, "paymenttermscode"))); + } + set + { + this.OnPropertyChanging("PaymentTermsCode"); + this.SetAttributeValue("paymenttermscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PaymentTermsCode"); + } + } + + /// + /// Select the preferred day of the week for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmentdaycode")] + public virtual contact_preferredappointmentdaycode? PreferredAppointmentDayCode + { + get + { + return ((contact_preferredappointmentdaycode?)(EntityOptionSetEnum.GetEnum(this, "preferredappointmentdaycode"))); + } + set + { + this.OnPropertyChanging("PreferredAppointmentDayCode"); + this.SetAttributeValue("preferredappointmentdaycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredAppointmentDayCode"); + } + } + + /// + /// Select the preferred time of day for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmenttimecode")] + public virtual contact_preferredappointmenttimecode? PreferredAppointmentTimeCode + { + get + { + return ((contact_preferredappointmenttimecode?)(EntityOptionSetEnum.GetEnum(this, "preferredappointmenttimecode"))); + } + set + { + this.OnPropertyChanging("PreferredAppointmentTimeCode"); + this.SetAttributeValue("preferredappointmenttimecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredAppointmentTimeCode"); + } + } + + /// + /// Select the preferred method of contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredcontactmethodcode")] + public virtual contact_preferredcontactmethodcode? PreferredContactMethodCode + { + get + { + return ((contact_preferredcontactmethodcode?)(EntityOptionSetEnum.GetEnum(this, "preferredcontactmethodcode"))); + } + set + { + this.OnPropertyChanging("PreferredContactMethodCode"); + this.SetAttributeValue("preferredcontactmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PreferredContactMethodCode"); + } + } + + /// + /// Choose the regular or preferred customer service representative for reference when scheduling service activities for the contact. + /// + [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"); + } + } + + /// + /// 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"); + } + } + + /// + /// Type the salutation of the contact to make sure the contact is addressed correctly in sales calls, email messages, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("salutation")] + public string Salutation + { + get + { + return this.GetAttributeValue("salutation"); + } + set + { + this.OnPropertyChanging("Salutation"); + this.SetAttributeValue("salutation", value); + this.OnPropertyChanged("Salutation"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("shippingmethodcode")] + public virtual contact_shippingmethodcode? ShippingMethodCode + { + get + { + return ((contact_shippingmethodcode?)(EntityOptionSetEnum.GetEnum(this, "shippingmethodcode"))); + } + set + { + this.OnPropertyChanging("ShippingMethodCode"); + this.SetAttributeValue("shippingmethodcode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("ShippingMethodCode"); + } + } + + /// + /// Choose the service level agreement (SLA) that you want to apply to the Contact 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"); + } + } + + /// + /// Type the name of the contact's spouse or partner for reference during calls, events, or other communications with the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("spousesname")] + public string SpousesName + { + get + { + return this.GetAttributeValue("spousesname"); + } + set + { + this.OnPropertyChanging("SpousesName"); + this.SetAttributeValue("spousesname", value); + this.OnPropertyChanged("SpousesName"); + } + } + + /// + /// 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"); + } + } + + /// + /// Shows whether the contact is active or inactive. Inactive contacts are read-only and can't be edited unless they are reactivated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")] + public virtual contact_statecode? StateCode + { + get + { + return ((contact_statecode?)(EntityOptionSetEnum.GetEnum(this, "statecode"))); + } + set + { + this.OnPropertyChanging("StateCode"); + this.SetAttributeValue("statecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StateCode"); + } + } + + /// + /// Select the contact's status. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")] + public virtual contact_statuscode? StatusCode + { + get + { + return ((contact_statuscode?)(EntityOptionSetEnum.GetEnum(this, "statuscode"))); + } + set + { + this.OnPropertyChanging("StatusCode"); + this.SetAttributeValue("statuscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StatusCode"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("subscriptionid")] + public System.Nullable SubscriptionId + { + get + { + return this.GetAttributeValue>("subscriptionid"); + } + set + { + this.OnPropertyChanging("SubscriptionId"); + this.SetAttributeValue("subscriptionid", value); + this.OnPropertyChanged("SubscriptionId"); + } + } + + /// + /// Type the suffix used in the contact's name, such as Jr. or Sr. to make sure the contact is addressed correctly in sales calls, email, and marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("suffix")] + public string Suffix + { + get + { + return this.GetAttributeValue("suffix"); + } + set + { + this.OnPropertyChanging("Suffix"); + this.SetAttributeValue("suffix", value); + this.OnPropertyChanged("Suffix"); + } + } + + /// + /// Type the main phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone1")] + public string Telephone1 + { + get + { + return this.GetAttributeValue("telephone1"); + } + set + { + this.OnPropertyChanging("Telephone1"); + this.SetAttributeValue("telephone1", value); + this.OnPropertyChanged("Telephone1"); + } + } + + /// + /// Type a second phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone2")] + public string Telephone2 + { + get + { + return this.GetAttributeValue("telephone2"); + } + set + { + this.OnPropertyChanging("Telephone2"); + this.SetAttributeValue("telephone2", value); + this.OnPropertyChanged("Telephone2"); + } + } + + /// + /// Type a third phone number for this contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone3")] + public string Telephone3 + { + get + { + return this.GetAttributeValue("telephone3"); + } + set + { + this.OnPropertyChanging("Telephone3"); + this.SetAttributeValue("telephone3", value); + this.OnPropertyChanged("Telephone3"); + } + } + + /// + /// Select a region or territory for the contact for use in segmentation and analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("territorycode")] + public virtual contact_territorycode? TerritoryCode + { + get + { + return ((contact_territorycode?)(EntityOptionSetEnum.GetEnum(this, "territorycode"))); + } + set + { + this.OnPropertyChanging("TerritoryCode"); + this.SetAttributeValue("territorycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("TerritoryCode"); + } + } + + /// + /// Total time spent for emails (read and write) and meetings by me in relation to the contact record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timespentbymeonemailandmeetings")] + public string TimeSpentByMeOnEmailAndMeetings + { + get + { + return this.GetAttributeValue("timespentbymeonemailandmeetings"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")] + public System.Nullable TimeZoneRuleVersionNumber + { + get + { + return this.GetAttributeValue>("timezoneruleversionnumber"); + } + set + { + this.OnPropertyChanging("TimeZoneRuleVersionNumber"); + this.SetAttributeValue("timezoneruleversionnumber", value); + this.OnPropertyChanged("TimeZoneRuleVersionNumber"); + } + } + + /// + /// Choose the local currency for the record to make sure budgets are reported in the correct currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("transactioncurrencyid")] + public Microsoft.Xrm.Sdk.EntityReference TransactionCurrencyId + { + get + { + return this.GetAttributeValue("transactioncurrencyid"); + } + set + { + this.OnPropertyChanging("TransactionCurrencyId"); + this.SetAttributeValue("transactioncurrencyid", value); + this.OnPropertyChanged("TransactionCurrencyId"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("traversedpath")] + public string TraversedPath + { + get + { + return this.GetAttributeValue("traversedpath"); + } + set + { + this.OnPropertyChanging("TraversedPath"); + this.SetAttributeValue("traversedpath", value); + this.OnPropertyChanged("TraversedPath"); + } + } + + /// + /// Time zone code that was in use when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")] + public System.Nullable UTCConversionTimeZoneCode + { + get + { + return this.GetAttributeValue>("utcconversiontimezonecode"); + } + set + { + this.OnPropertyChanging("UTCConversionTimeZoneCode"); + this.SetAttributeValue("utcconversiontimezonecode", value); + this.OnPropertyChanged("UTCConversionTimeZoneCode"); + } + } + + /// + /// Version number of the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// Type the contact's professional or personal website or blog URL. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("websiteurl")] + public string WebSiteUrl + { + get + { + return this.GetAttributeValue("websiteurl"); + } + set + { + this.OnPropertyChanging("WebSiteUrl"); + this.SetAttributeValue("websiteurl", value); + this.OnPropertyChanged("WebSiteUrl"); + } + } + + /// + /// Type the phonetic spelling of the contact's first name, if the name is specified in Japanese, to make sure the name is pronounced correctly in phone calls with the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yomifirstname")] + public string YomiFirstName + { + get + { + return this.GetAttributeValue("yomifirstname"); + } + set + { + this.OnPropertyChanging("YomiFirstName"); + this.SetAttributeValue("yomifirstname", value); + this.OnPropertyChanged("YomiFirstName"); + } + } + + /// + /// Shows the combined Yomi first and last names of the contact so that the full phonetic name can be displayed in views and reports. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yomifullname")] + public string YomiFullName + { + get + { + return this.GetAttributeValue("yomifullname"); + } + } + + /// + /// Type the phonetic spelling of the contact's last name, if the name is specified in Japanese, to make sure the name is pronounced correctly in phone calls with the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yomilastname")] + public string YomiLastName + { + get + { + return this.GetAttributeValue("yomilastname"); + } + set + { + this.OnPropertyChanging("YomiLastName"); + this.SetAttributeValue("yomilastname", value); + this.OnPropertyChanged("YomiLastName"); + } + } + + /// + /// Type the phonetic spelling of the contact's middle name, if the name is specified in Japanese, to make sure the name is pronounced correctly in phone calls with the contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yomimiddlename")] + public string YomiMiddleName + { + get + { + return this.GetAttributeValue("yomimiddlename"); + } + set + { + this.OnPropertyChanging("YomiMiddleName"); + this.SetAttributeValue("yomimiddlename", value); + this.OnPropertyChanged("YomiMiddleName"); + } + } + + /// + /// 1:N account_primary_contact + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_primary_contact")] + public System.Collections.Generic.IEnumerable account_primary_contact + { + get + { + return this.GetRelatedEntities("account_primary_contact", null); + } + set + { + this.OnPropertyChanging("account_primary_contact"); + this.SetRelatedEntities("account_primary_contact", null, value); + this.OnPropertyChanged("account_primary_contact"); + } + } + + /// + /// 1:N contact_customer_contacts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedcontact_customer_contacts + { + get + { + return this.GetRelatedEntities("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedcontact_customer_contacts"); + this.SetRelatedEntities("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedcontact_customer_contacts"); + } + } + + /// + /// 1:N contact_master_contact + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_master_contact", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedcontact_master_contact + { + get + { + return this.GetRelatedEntities("contact_master_contact", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedcontact_master_contact"); + this.SetRelatedEntities("contact_master_contact", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedcontact_master_contact"); + } + } + + /// + /// 1:N Contact_Tasks + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Contact_Tasks")] + public System.Collections.Generic.IEnumerable Contact_Tasks + { + get + { + return this.GetRelatedEntities("Contact_Tasks", null); + } + set + { + this.OnPropertyChanging("Contact_Tasks"); + this.SetRelatedEntities("Contact_Tasks", null, value); + this.OnPropertyChanged("Contact_Tasks"); + } + } + + /// + /// N:1 contact_customer_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentcustomerid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_customer_accounts")] + public DataverseEntities.Account contact_customer_accounts + { + get + { + return this.GetRelatedEntity("contact_customer_accounts", null); + } + set + { + this.OnPropertyChanging("contact_customer_accounts"); + this.SetRelatedEntity("contact_customer_accounts", null, value); + this.OnPropertyChanged("contact_customer_accounts"); + } + } + + /// + /// N:1 contact_customer_contacts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentcustomerid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public DataverseEntities.Contact Referencingcontact_customer_contacts + { + get + { + return this.GetRelatedEntity("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + set + { + this.OnPropertyChanging("Referencingcontact_customer_contacts"); + this.SetRelatedEntity("contact_customer_contacts", Microsoft.Xrm.Sdk.EntityRole.Referencing, value); + this.OnPropertyChanged("Referencingcontact_customer_contacts"); + } + } + + /// + /// N:1 contact_master_contact + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_master_contact", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public DataverseEntities.Contact Referencingcontact_master_contact + { + get + { + return this.GetRelatedEntity("contact_master_contact", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + } + } +} +#pragma warning restore CS1591 diff --git a/tests/DataverseEntities/Entities/task.cs b/tests/DataverseEntities/Entities/task.cs new file mode 100644 index 00000000..82e258e7 --- /dev/null +++ b/tests/DataverseEntities/Entities/task.cs @@ -0,0 +1,961 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + /// + /// Priority of the task. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum task_prioritycode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Low = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Normal = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + High = 2, + } + + /// + /// Status of the task. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum task_statecode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Open = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Completed = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Canceled = 2, + } + + /// + /// Reason for the status of the task. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum task_statuscode + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + NotStarted = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + InProgress = 3, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Waitingonsomeoneelse = 4, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Completed = 5, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Canceled = 6, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Deferred = 7, + } + + /// + /// Generic activity representing work needed to be done. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("task")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public partial class Task : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged + { + + /// + /// Default Constructor. + /// + public Task() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "task"; + + public const string EntityLogicalCollectionName = "tasks"; + + public const string EntitySetName = "tasks"; + + public const int EntityTypeCode = 4212; + + 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)); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activityadditionalparams")] + public string ActivityAdditionalParams + { + get + { + return this.GetAttributeValue("activityadditionalparams"); + } + set + { + this.OnPropertyChanging("ActivityAdditionalParams"); + this.SetAttributeValue("activityadditionalparams", value); + this.OnPropertyChanged("ActivityAdditionalParams"); + } + } + + /// + /// Unique identifier of the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activityid")] + public System.Nullable ActivityId + { + get + { + return this.GetAttributeValue>("activityid"); + } + set + { + this.OnPropertyChanging("ActivityId"); + this.SetAttributeValue("activityid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("ActivityId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activityid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.ActivityId = value; + } + } + + /// + /// Type of activity. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activitytypecode")] + public string ActivityTypeCode + { + get + { + return this.GetAttributeValue("activitytypecode"); + } + } + + /// + /// Type the number of minutes spent on the task. The duration is used in reporting. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("actualdurationminutes")] + public System.Nullable ActualDurationMinutes + { + get + { + return this.GetAttributeValue>("actualdurationminutes"); + } + set + { + this.OnPropertyChanging("ActualDurationMinutes"); + this.SetAttributeValue("actualdurationminutes", value); + this.OnPropertyChanged("ActualDurationMinutes"); + } + } + + /// + /// Enter the actual end date and time of the task. By default, it displays when the activity was completed or canceled. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("actualend")] + public System.Nullable ActualEnd + { + get + { + return this.GetAttributeValue>("actualend"); + } + set + { + this.OnPropertyChanging("ActualEnd"); + this.SetAttributeValue("actualend", value); + this.OnPropertyChanged("ActualEnd"); + } + } + + /// + /// Enter the actual start date and time for the task. By default, it displays when the task was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("actualstart")] + public System.Nullable ActualStart + { + get + { + return this.GetAttributeValue>("actualstart"); + } + set + { + this.OnPropertyChanging("ActualStart"); + this.SetAttributeValue("actualstart", value); + this.OnPropertyChanged("ActualStart"); + } + } + + /// + /// Type a category to identify the task type, such as lead gathering or customer follow up, to tie the task to a business group or function. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("category")] + public string Category + { + get + { + return this.GetAttributeValue("category"); + } + set + { + this.OnPropertyChanging("Category"); + this.SetAttributeValue("category", value); + this.OnPropertyChanged("Category"); + } + } + + /// + /// Shows who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")] + public Microsoft.Xrm.Sdk.EntityReference CreatedBy + { + get + { + return this.GetAttributeValue("createdby"); + } + } + + /// + /// 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"); + } + } + + /// + /// Assigned Task Unique Id + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("crmtaskassigneduniqueid")] + public System.Nullable CrmTaskAssignedUniqueId + { + get + { + return this.GetAttributeValue>("crmtaskassigneduniqueid"); + } + set + { + this.OnPropertyChanging("CrmTaskAssignedUniqueId"); + this.SetAttributeValue("crmtaskassigneduniqueid", value); + this.OnPropertyChanged("CrmTaskAssignedUniqueId"); + } + } + + /// + /// Type additional information to describe the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("description")] + public string Description + { + get + { + return this.GetAttributeValue("description"); + } + set + { + this.OnPropertyChanging("Description"); + this.SetAttributeValue("description", value); + this.OnPropertyChanged("Description"); + } + } + + /// + /// 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"); + } + } + + /// + /// 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"); + } + } + + /// + /// Information which specifies whether the task was billed as part of resolving a case. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("isbilled")] + public System.Nullable IsBilled + { + get + { + return this.GetAttributeValue>("isbilled"); + } + set + { + this.OnPropertyChanging("IsBilled"); + this.SetAttributeValue("isbilled", value); + this.OnPropertyChanged("IsBilled"); + } + } + + /// + /// Information regarding whether the activity is a regular activity type or event type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("isregularactivity")] + public System.Nullable IsRegularActivity + { + get + { + return this.GetAttributeValue>("isregularactivity"); + } + } + + /// + /// Information which specifies if the task was created from a workflow rule. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("isworkflowcreated")] + public System.Nullable IsWorkflowCreated + { + get + { + return this.GetAttributeValue>("isworkflowcreated"); + } + set + { + this.OnPropertyChanging("IsWorkflowCreated"); + this.SetAttributeValue("isworkflowcreated", value); + this.OnPropertyChanged("IsWorkflowCreated"); + } + } + + /// + /// 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 who last updated the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedBy + { + get + { + return this.GetAttributeValue("modifiedby"); + } + } + + /// + /// 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 last updated the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedOnBehalfBy + { + get + { + return this.GetAttributeValue("modifiedonbehalfby"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("msft_datastate")] + public virtual msft_datastate? msft_DataState + { + get + { + return ((msft_datastate?)(EntityOptionSetEnum.GetEnum(this, "msft_datastate"))); + } + } + + /// + /// 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"); + } + } + + /// + /// 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"); + } + } + + /// + /// Shows the record owner's business unit. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference OwningBusinessUnit + { + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the team that owns the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + public Microsoft.Xrm.Sdk.EntityReference OwningTeam + { + get + { + return this.GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier of the user that owns the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference OwningUser + { + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Type the percentage complete value for the task to track tasks to completion. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("percentcomplete")] + public System.Nullable PercentComplete + { + get + { + return this.GetAttributeValue>("percentcomplete"); + } + set + { + this.OnPropertyChanging("PercentComplete"); + this.SetAttributeValue("percentcomplete", value); + this.OnPropertyChanged("PercentComplete"); + } + } + + /// + /// Select the priority so that preferred customers or critical issues are handled quickly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("prioritycode")] + public virtual task_prioritycode? PriorityCode + { + get + { + return ((task_prioritycode?)(EntityOptionSetEnum.GetEnum(this, "prioritycode"))); + } + set + { + this.OnPropertyChanging("PriorityCode"); + this.SetAttributeValue("prioritycode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("PriorityCode"); + } + } + + /// + /// 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"); + } + } + + /// + /// Choose the record that the task relates to. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("regardingobjectid")] + public Microsoft.Xrm.Sdk.EntityReference RegardingObjectId + { + get + { + return this.GetAttributeValue("regardingobjectid"); + } + set + { + this.OnPropertyChanging("RegardingObjectId"); + this.SetAttributeValue("regardingobjectid", value); + this.OnPropertyChanged("RegardingObjectId"); + } + } + + /// + /// Scheduled duration of the task, specified in minutes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("scheduleddurationminutes")] + public System.Nullable ScheduledDurationMinutes + { + get + { + return this.GetAttributeValue>("scheduleddurationminutes"); + } + } + + /// + /// Enter the expected due date and time. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("scheduledend")] + public System.Nullable ScheduledEnd + { + get + { + return this.GetAttributeValue>("scheduledend"); + } + set + { + this.OnPropertyChanging("ScheduledEnd"); + this.SetAttributeValue("scheduledend", value); + this.OnPropertyChanged("ScheduledEnd"); + } + } + + /// + /// Enter the expected due date and time. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("scheduledstart")] + public System.Nullable ScheduledStart + { + get + { + return this.GetAttributeValue>("scheduledstart"); + } + set + { + this.OnPropertyChanging("ScheduledStart"); + this.SetAttributeValue("scheduledstart", value); + this.OnPropertyChanged("ScheduledStart"); + } + } + + /// + /// Choose the service level agreement (SLA) that you want to apply to the Task 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 Task. 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 date and time by which the activities are sorted. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("sortdate")] + public System.Nullable SortDate + { + get + { + return this.GetAttributeValue>("sortdate"); + } + set + { + this.OnPropertyChanging("SortDate"); + this.SetAttributeValue("sortdate", value); + this.OnPropertyChanged("SortDate"); + } + } + + /// + /// 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"); + } + } + + /// + /// Shows whether the task is open, completed, or canceled. Completed and canceled tasks are read-only and can't be edited. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")] + public virtual task_statecode? StateCode + { + get + { + return ((task_statecode?)(EntityOptionSetEnum.GetEnum(this, "statecode"))); + } + set + { + this.OnPropertyChanging("StateCode"); + this.SetAttributeValue("statecode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StateCode"); + } + } + + /// + /// Select the task's status. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")] + public virtual task_statuscode? StatusCode + { + get + { + return ((task_statuscode?)(EntityOptionSetEnum.GetEnum(this, "statuscode"))); + } + set + { + this.OnPropertyChanging("StatusCode"); + this.SetAttributeValue("statuscode", value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null); + this.OnPropertyChanged("StatusCode"); + } + } + + /// + /// Type a subcategory to identify the task type and relate the activity to a specific product, sales region, business group, or other function. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("subcategory")] + public string Subcategory + { + get + { + return this.GetAttributeValue("subcategory"); + } + set + { + this.OnPropertyChanging("Subcategory"); + this.SetAttributeValue("subcategory", value); + this.OnPropertyChanged("Subcategory"); + } + } + + /// + /// Type a short description about the objective or primary topic of the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("subject")] + public string Subject + { + get + { + return this.GetAttributeValue("subject"); + } + set + { + this.OnPropertyChanging("Subject"); + this.SetAttributeValue("subject", value); + this.OnPropertyChanged("Subject"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("subscriptionid")] + public System.Nullable SubscriptionId + { + get + { + return this.GetAttributeValue>("subscriptionid"); + } + set + { + this.OnPropertyChanging("SubscriptionId"); + this.SetAttributeValue("subscriptionid", value); + this.OnPropertyChanged("SubscriptionId"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")] + public System.Nullable TimeZoneRuleVersionNumber + { + get + { + return this.GetAttributeValue>("timezoneruleversionnumber"); + } + set + { + this.OnPropertyChanging("TimeZoneRuleVersionNumber"); + this.SetAttributeValue("timezoneruleversionnumber", value); + this.OnPropertyChanged("TimeZoneRuleVersionNumber"); + } + } + + /// + /// Choose the local currency for the record to make sure budgets are reported in the correct currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("transactioncurrencyid")] + public Microsoft.Xrm.Sdk.EntityReference TransactionCurrencyId + { + get + { + return this.GetAttributeValue("transactioncurrencyid"); + } + set + { + this.OnPropertyChanging("TransactionCurrencyId"); + this.SetAttributeValue("transactioncurrencyid", value); + this.OnPropertyChanged("TransactionCurrencyId"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("traversedpath")] + public string TraversedPath + { + get + { + return this.GetAttributeValue("traversedpath"); + } + set + { + this.OnPropertyChanging("TraversedPath"); + this.SetAttributeValue("traversedpath", value); + this.OnPropertyChanged("TraversedPath"); + } + } + + /// + /// Time zone code that was in use when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")] + public System.Nullable UTCConversionTimeZoneCode + { + get + { + return this.GetAttributeValue>("utcconversiontimezonecode"); + } + set + { + this.OnPropertyChanging("UTCConversionTimeZoneCode"); + this.SetAttributeValue("utcconversiontimezonecode", value); + this.OnPropertyChanged("UTCConversionTimeZoneCode"); + } + } + + /// + /// Version number of the task. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// N:1 Account_Tasks + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("regardingobjectid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Tasks")] + public DataverseEntities.Account Account_Tasks + { + get + { + return this.GetRelatedEntity("Account_Tasks", null); + } + set + { + this.OnPropertyChanging("Account_Tasks"); + this.SetRelatedEntity("Account_Tasks", null, value); + this.OnPropertyChanged("Account_Tasks"); + } + } + + /// + /// N:1 Contact_Tasks + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("regardingobjectid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Contact_Tasks")] + public DataverseEntities.Contact Contact_Tasks + { + get + { + return this.GetRelatedEntity("Contact_Tasks", null); + } + set + { + this.OnPropertyChanging("Contact_Tasks"); + this.SetRelatedEntity("Contact_Tasks", null, value); + this.OnPropertyChanged("Contact_Tasks"); + } + } + } +} +#pragma warning restore CS1591 diff --git a/tests/DataverseEntities/EntityOptionSetEnum.cs b/tests/DataverseEntities/EntityOptionSetEnum.cs new file mode 100644 index 00000000..e19389df --- /dev/null +++ b/tests/DataverseEntities/EntityOptionSetEnum.cs @@ -0,0 +1,61 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + internal sealed class EntityOptionSetEnum + { + + public static System.Nullable GetEnum(Microsoft.Xrm.Sdk.Entity entity, string attributeLogicalName) + { + if (entity.Attributes.ContainsKey(attributeLogicalName)) + { + Microsoft.Xrm.Sdk.OptionSetValue value = entity.GetAttributeValue(attributeLogicalName); + if (value != null) + { + return value.Value; + } + } + return null; + } + +#if FAKE_XRM_EASY_9 + public static System.Collections.Generic.IEnumerable GetMultiEnum(Microsoft.Xrm.Sdk.Entity entity, string attributeLogicalName) + + { + Microsoft.Xrm.Sdk.OptionSetValueCollection value = entity.GetAttributeValue(attributeLogicalName); + System.Collections.Generic.List list = new System.Collections.Generic.List(); + if (value == null) + { + return list; + } + list.AddRange(System.Linq.Enumerable.Select(value, v => (T)(object)v.Value)); + return list; + } + + public static Microsoft.Xrm.Sdk.OptionSetValueCollection GetMultiEnum(Microsoft.Xrm.Sdk.Entity entity, string attributeLogicalName, System.Collections.Generic.IEnumerable values) + + { + if (values == null) + { + return null; + } + Microsoft.Xrm.Sdk.OptionSetValueCollection collection = new Microsoft.Xrm.Sdk.OptionSetValueCollection(); + collection.AddRange(System.Linq.Enumerable.Select(values, v => new Microsoft.Xrm.Sdk.OptionSetValue((int)(object)v))); + return collection; + } +#endif + + } +} +#pragma warning restore CS1591 \ No newline at end of file diff --git a/tests/DataverseEntities/OptionSets/componentstate.cs b/tests/DataverseEntities/OptionSets/componentstate.cs new file mode 100644 index 00000000..4c96693a --- /dev/null +++ b/tests/DataverseEntities/OptionSets/componentstate.cs @@ -0,0 +1,37 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + /// + /// The state of this component. + /// + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum componentstate + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Published = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Unpublished = 1, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Deleted = 2, + + [System.Runtime.Serialization.EnumMemberAttribute()] + DeletedUnpublished = 3, + } +} +#pragma warning restore CS1591 \ No newline at end of file diff --git a/tests/DataverseEntities/OptionSets/msft_datastate.cs b/tests/DataverseEntities/OptionSets/msft_datastate.cs new file mode 100644 index 00000000..7eedda37 --- /dev/null +++ b/tests/DataverseEntities/OptionSets/msft_datastate.cs @@ -0,0 +1,28 @@ +#pragma warning disable CS1591 +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace DataverseEntities +{ + + + [System.Runtime.Serialization.DataContractAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.1.0.118")] + public enum msft_datastate + { + + [System.Runtime.Serialization.EnumMemberAttribute()] + Default = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Retain = 1, + } +} +#pragma warning restore CS1591 \ No newline at end of file diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs index b463ffa8..049ccac1 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs @@ -318,15 +318,47 @@ public void Should_return_error_if_entity_id_does_not_exists() Assert.Throws(() =>_context.GetEntityById("contact", Guid.NewGuid())); } - + + [Fact] + public void Should_find_reflected_type_by_entity_logical_name() + { + var assembly = typeof(Crm.Account).Assembly; + _context.EnableProxyTypes(assembly); + + var type = _context.FindReflectedType(Account.EntityLogicalName); + Assert.Equal(typeof(Account), type); + } + [Fact] public void Should_find_reflected_type_by_entity_type_code() { var assembly = typeof(Crm.Account).Assembly; _context.EnableProxyTypes(assembly); - var type = _context.FindReflectedType(1); + var type = _context.FindReflectedType(Account.EntityTypeCode); Assert.Equal(typeof(Account), type); } + + [Fact] + public void Should_throw_exception_when_finding_reflected_type_by_entity_logical_name_if_exists_in_more_than_one_assembly() + { + var assembly = typeof(Crm.Account).Assembly; + var assembly2 = typeof(DataverseEntities.Account).Assembly; + _context.EnableProxyTypes(assembly); + _context.EnableProxyTypes(assembly2); + + Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); + } + + [Fact] + public void Should_throw_exception_when_finding_reflected_type_by_entity_type_code_if_exists_in_more_than_one_assembly() + { + var assembly = typeof(Crm.Account).Assembly; + var assembly2 = typeof(DataverseEntities.Account).Assembly; + _context.EnableProxyTypes(assembly); + _context.EnableProxyTypes(assembly2); + + Assert.Throws(() => _context.FindReflectedType(Account.EntityTypeCode)); + } } } diff --git a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj index 950e9254..16bf17b6 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj +++ b/tests/FakeXrmEasy.Core.Tests/FakeXrmEasy.Core.Tests.csproj @@ -59,9 +59,13 @@ DEBUG;TRACE;FAKE_XRM_EASY_9;FXE_V2 + + + + - + @@ -150,5 +154,6 @@ + From b19802aff6af1931e20fc19a7318a6edca6f2c94 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 21:58:55 +0200 Subject: [PATCH 04/10] Add missing project file --- .../DataverseEntities.csproj | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 tests/DataverseEntities/DataverseEntities.csproj diff --git a/tests/DataverseEntities/DataverseEntities.csproj b/tests/DataverseEntities/DataverseEntities.csproj new file mode 100644 index 00000000..5dad1807 --- /dev/null +++ b/tests/DataverseEntities/DataverseEntities.csproj @@ -0,0 +1,81 @@ + + + + net462 + net462;net452 + net452 + net452 + net452 + net452 + + FAKE_XRM_EASY;FAKE_XRM_EASY_2013;FAKE_XRM_EASY_2015;FAKE_XRM_EASY_2016;FAKE_XRM_EASY_365;FAKE_XRM_EASY_9 + ..\..\fakexrmeasy.snk + True + + + + DEBUG;TRACE; + + + + DEBUG;TRACE; + + + + DEBUG;TRACE; + + + + DEBUG;TRACE; + + + + DEBUG;TRACE; + + + + DEBUG;TRACE; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 8fe8bb4c3d2de44a953a81e2f285e767de0bb456 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 22:12:11 +0200 Subject: [PATCH 05/10] Remove unreachable code --- src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs | 10 ---------- .../FakeContextTests/FakeContextTests.cs | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs index bdd2e55c..506da36f 100644 --- a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs +++ b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs @@ -95,11 +95,6 @@ private static Type FindReflectedType(string logicalName, { try { - if (assembly == null) - { - throw new ArgumentNullException(nameof(assembly)); - } - var subClassType = assembly.GetTypes() .Where(t => typeof(Entity).IsAssignableFrom(t)) .Where(t => t.GetCustomAttributes(typeof(EntityLogicalNameAttribute), true).Length > 0) @@ -142,11 +137,6 @@ private static Type FindReflectedType(int entityTypeCode, { try { - if (assembly == null) - { - throw new ArgumentNullException(nameof(assembly)); - } - var subClassType = assembly.GetTypes() .Where(t => typeof(Entity).IsAssignableFrom(t)) .Where(t => t.GetCustomAttributes(typeof(EntityLogicalNameAttribute), true).Length > 0) diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs index 049ccac1..df39d6b7 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs @@ -350,6 +350,15 @@ public void Should_throw_exception_when_finding_reflected_type_by_entity_logical Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); } + [Fact] + public void Should_throw_argument_exception_when_finding_reflected_type_by_entity_logical_for_a_null_assembly() + { + var assembly = typeof(Crm.Account).Assembly; + _context.EnableProxyTypes(assembly); + + Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); + } + [Fact] public void Should_throw_exception_when_finding_reflected_type_by_entity_type_code_if_exists_in_more_than_one_assembly() { From f9db119298050e544b9badce179bbf8e43776e86 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 22:13:02 +0200 Subject: [PATCH 06/10] Remove unnecessary unit test --- .../FakeContextTests/FakeContextTests.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs index df39d6b7..049ccac1 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs @@ -350,15 +350,6 @@ public void Should_throw_exception_when_finding_reflected_type_by_entity_logical Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); } - [Fact] - public void Should_throw_argument_exception_when_finding_reflected_type_by_entity_logical_for_a_null_assembly() - { - var assembly = typeof(Crm.Account).Assembly; - _context.EnableProxyTypes(assembly); - - Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); - } - [Fact] public void Should_throw_exception_when_finding_reflected_type_by_entity_type_code_if_exists_in_more_than_one_assembly() { From 3aca1b6a7f0b5e2715d069ea56d8d94d39a1a4a1 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Oct 2023 22:30:25 +0200 Subject: [PATCH 07/10] Remove unused method --- src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs index 506da36f..9e85058e 100644 --- a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs +++ b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs @@ -126,7 +126,7 @@ private static Type FindReflectedType(string logicalName, /// /// /// Assembly where early-bound type is searched for given - /// . + /// . /// /// /// Early-bound type of if it's found @@ -304,15 +304,5 @@ protected IQueryable CreateQuery(string entityLogicalName) return lst.AsQueryable(); } - - /// - /// - /// - /// - /// - public IQueryable CreateQueryFromEntityName(string entityName) - { - return Db.GetTable(entityName).Rows.AsQueryable(); - } } } \ No newline at end of file From 3a4cf9c5ea3b261e6f4b062055f9ab8b6ebc3a92 Mon Sep 17 00:00:00 2001 From: Jordi Date: Sat, 14 Oct 2023 10:55:40 +0200 Subject: [PATCH 08/10] Introduced user-defined exceptions to detect the same early-bound type defined in multiple assemblies. --- CHANGELOG.md | 1 + .../Exceptions/FindReflectedTypeException.cs | 26 ++++++++++ .../MultipleEarlyBoundTypesFoundException.cs | 49 +++++++++++++++++++ .../XrmFakedContext.Queries.cs | 43 ++-------------- .../FindReflectedTypeExceptionTests.cs | 29 +++++++++++ .../FakeContextTests/FakeContextTests.cs | 5 +- 6 files changed, 113 insertions(+), 40 deletions(-) create mode 100644 src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs create mode 100644 src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs create mode 100644 tests/FakeXrmEasy.Core.Tests/Exceptions/FindReflectedTypeExceptionTests.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a83164b..2f1f48d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Added +- Introduced new user-defined exceptions to check whether an early-bound type is defined in multiple assemblies. - New method to retrieve early bound types based on EntityTypeCode. ### Changed diff --git a/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs b/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs new file mode 100644 index 00000000..7a93281f --- /dev/null +++ b/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs @@ -0,0 +1,26 @@ +using System; +using System.Reflection; + +namespace FakeXrmEasy.Core.Exceptions +{ + public class FindReflectedTypeException : Exception + { + public FindReflectedTypeException(string message) : base(message) + { + + } + + public static FindReflectedTypeException New(ReflectionTypeLoadException reflectionTypeLoadException) + { + // now look at ex.LoaderExceptions - this is an Exception[], so: + var s = ""; + foreach (var innerException in reflectionTypeLoadException.LoaderExceptions) + { + // write details of "inner", in particular inner.Message + s += innerException.Message + " "; + } + + return new FindReflectedTypeException("XrmFakedContext.FindReflectedType: " + s); + } + } +} \ No newline at end of file diff --git a/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs new file mode 100644 index 00000000..24f47a59 --- /dev/null +++ b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace FakeXrmEasy.Core.Exceptions +{ + /// + /// Exception raised when an early-bound type exists for the same logical name + /// or entity type code in more than one assembly and so it's impossible to decide which one should + /// be used + /// + public class MultipleEarlyBoundTypesFoundException : Exception + { + private readonly string _errorMessage; + + public MultipleEarlyBoundTypesFoundException(string logicalName, IEnumerable types) + { + var baseMessage = + $"The early-bound type for logical name '{logicalName}' was found in more than one assembly. When using early-bound types, a given type must be unique across all the assemblies."; + + var log = GenerateLog(types); + + _errorMessage = $"{baseMessage} Assemblies where the type was found={log.ToString()}"; + } + + public MultipleEarlyBoundTypesFoundException(int entityTypeCode, IEnumerable types) + { + var baseMessage = + $"The early-bound type for Entity Type Code '{entityTypeCode.ToString()}' was found in more than one assembly. When using early-bound types, a given type must be unique across all the assemblies."; + + var log = GenerateLog(types); + + _errorMessage = $"{baseMessage} Assemblies where the type was found={log.ToString()}"; + } + + private string GenerateLog(IEnumerable types) + { + var log = new StringBuilder(); + foreach (var type in types) + { + log.Append($"'{type.Assembly.GetName().Name}'; "); + } + + return log.ToString(); + } + + public override string Message => _errorMessage; + } +} \ No newline at end of file diff --git a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs index 9e85058e..1248f661 100644 --- a/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs +++ b/src/FakeXrmEasy.Core/XrmFakedContext.Queries.cs @@ -4,6 +4,7 @@ using System.Reflection; using System.Xml.Linq; using FakeXrmEasy.Abstractions; +using FakeXrmEasy.Core.Exceptions; using FakeXrmEasy.Extensions; using FakeXrmEasy.Extensions.FetchXml; using Microsoft.Xrm.Sdk; @@ -31,16 +32,7 @@ public Type FindReflectedType(string logicalName) if (types.Count() > 1) { - var errorMsg = $"Type { logicalName } is defined in multiple assemblies: "; - foreach (var type in types) - { - errorMsg += type.Assembly - .GetName() - .Name + "; "; - } - var lastIndex = errorMsg.LastIndexOf("; "); - errorMsg = errorMsg.Substring(0, lastIndex) + "."; - throw new InvalidOperationException(errorMsg); + throw new MultipleEarlyBoundTypesFoundException(logicalName, types); } return types.SingleOrDefault(); @@ -60,16 +52,7 @@ public Type FindReflectedType(int entityTypeCode) if (types.Count() > 1) { - var errorMsg = $"Type { entityTypeCode } is defined in multiple assemblies: "; - foreach (var type in types) - { - errorMsg += type.Assembly - .GetName() - .Name + "; "; - } - var lastIndex = errorMsg.LastIndexOf("; "); - errorMsg = errorMsg.Substring(0, lastIndex) + "."; - throw new InvalidOperationException(errorMsg); + throw new MultipleEarlyBoundTypesFoundException(entityTypeCode, types); } return types.SingleOrDefault(); @@ -105,15 +88,7 @@ private static Type FindReflectedType(string logicalName, } catch (ReflectionTypeLoadException exception) { - // now look at ex.LoaderExceptions - this is an Exception[], so: - var s = ""; - foreach (var innerException in exception.LoaderExceptions) - { - // write details of "inner", in particular inner.Message - s += innerException.Message + " "; - } - - throw new Exception("XrmFakedContext.FindReflectedType: " + s); + throw FindReflectedTypeException.New(exception); } } @@ -147,15 +122,7 @@ private static Type FindReflectedType(int entityTypeCode, } catch (ReflectionTypeLoadException exception) { - // now look at ex.LoaderExceptions - this is an Exception[], so: - var s = ""; - foreach (var innerException in exception.LoaderExceptions) - { - // write details of "inner", in particular inner.Message - s += innerException.Message + " "; - } - - throw new Exception("XrmFakedContext.FindReflectedType: " + s); + throw FindReflectedTypeException.New(exception); } } diff --git a/tests/FakeXrmEasy.Core.Tests/Exceptions/FindReflectedTypeExceptionTests.cs b/tests/FakeXrmEasy.Core.Tests/Exceptions/FindReflectedTypeExceptionTests.cs new file mode 100644 index 00000000..a0702d0b --- /dev/null +++ b/tests/FakeXrmEasy.Core.Tests/Exceptions/FindReflectedTypeExceptionTests.cs @@ -0,0 +1,29 @@ +using System; +using System.Reflection; +using DataverseEntities; +using FakeXrmEasy.Core.Exceptions; +using Xunit; + +namespace FakeXrmEasy.Core.Tests.Exceptions +{ + public class FindReflectedTypeExceptionTests + { + private readonly Type _type1; + private readonly Exception _exception; + private readonly ReflectionTypeLoadException _reflectionException; + + public FindReflectedTypeExceptionTests() + { + _type1 = typeof(Account); + _exception = new Exception(); + _reflectionException = new ReflectionTypeLoadException(new Type[] {_type1}, new Exception[] {_exception}); + } + + [Fact] + public void Should_create_find_reflected_type_exception() + { + var ex = FindReflectedTypeException.New(_reflectionException); + Assert.NotNull(ex); + } + } +} \ No newline at end of file diff --git a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs index 049ccac1..5ca0212a 100644 --- a/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs +++ b/tests/FakeXrmEasy.Core.Tests/FakeContextTests/FakeContextTests.cs @@ -8,6 +8,7 @@ using System.Threading; using Crm; using System.Reflection; +using FakeXrmEasy.Core.Exceptions; namespace FakeXrmEasy.Core.Tests { @@ -347,7 +348,7 @@ public void Should_throw_exception_when_finding_reflected_type_by_entity_logical _context.EnableProxyTypes(assembly); _context.EnableProxyTypes(assembly2); - Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); + Assert.Throws(() => _context.FindReflectedType(Account.EntityLogicalName)); } [Fact] @@ -358,7 +359,7 @@ public void Should_throw_exception_when_finding_reflected_type_by_entity_type_co _context.EnableProxyTypes(assembly); _context.EnableProxyTypes(assembly2); - Assert.Throws(() => _context.FindReflectedType(Account.EntityTypeCode)); + Assert.Throws(() => _context.FindReflectedType(Account.EntityTypeCode)); } } } From 8400862adbc30ce6bbe7e94f127c5890ba3fe187 Mon Sep 17 00:00:00 2001 From: Jordi Date: Sat, 14 Oct 2023 11:10:09 +0200 Subject: [PATCH 09/10] Add missing XML comments --- .../Exceptions/FindReflectedTypeException.cs | 19 ++++++++++++++++--- .../MultipleEarlyBoundTypesFoundException.cs | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs b/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs index 7a93281f..0e5ca047 100644 --- a/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs +++ b/src/FakeXrmEasy.Core/Exceptions/FindReflectedTypeException.cs @@ -1,26 +1,39 @@ using System; using System.Reflection; +using System.Text; namespace FakeXrmEasy.Core.Exceptions { + /// + /// Exception raised when the generated early bound types have an unsupported format + /// public class FindReflectedTypeException : Exception { + /// + /// Default constructor + /// + /// public FindReflectedTypeException(string message) : base(message) { } + /// + /// Creates a FindReflectedException from a ReflectionTypeLoadException + /// + /// + /// public static FindReflectedTypeException New(ReflectionTypeLoadException reflectionTypeLoadException) { // now look at ex.LoaderExceptions - this is an Exception[], so: - var s = ""; + var s = new StringBuilder(); foreach (var innerException in reflectionTypeLoadException.LoaderExceptions) { // write details of "inner", in particular inner.Message - s += innerException.Message + " "; + s.AppendLine(innerException.Message); } - return new FindReflectedTypeException("XrmFakedContext.FindReflectedType: " + s); + return new FindReflectedTypeException("XrmFakedContext.FindReflectedType: " + s.ToString()); } } } \ No newline at end of file diff --git a/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs index 24f47a59..26c9b14e 100644 --- a/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs +++ b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs @@ -38,7 +38,7 @@ private string GenerateLog(IEnumerable types) var log = new StringBuilder(); foreach (var type in types) { - log.Append($"'{type.Assembly.GetName().Name}'; "); + log.AppendLine($"'{type.Assembly.GetName().Name}'; "); } return log.ToString(); From 4c2a3cfd05ddca5ca8b3b382228f37efad93a26e Mon Sep 17 00:00:00 2001 From: Jordi Date: Sat, 14 Oct 2023 11:45:59 +0200 Subject: [PATCH 10/10] Add more missing XML comments --- .../MultipleEarlyBoundTypesFoundException.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs index 26c9b14e..99c735dd 100644 --- a/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs +++ b/src/FakeXrmEasy.Core/Exceptions/MultipleEarlyBoundTypesFoundException.cs @@ -13,6 +13,11 @@ public class MultipleEarlyBoundTypesFoundException : Exception { private readonly string _errorMessage; + /// + /// Creates a MultipleEarlyBoundTypesFoundException from a logical name + /// + /// The searched logical name + /// The types in which the logical name found public MultipleEarlyBoundTypesFoundException(string logicalName, IEnumerable types) { var baseMessage = @@ -23,6 +28,11 @@ public MultipleEarlyBoundTypesFoundException(string logicalName, IEnumerable + /// Creates a MultipleEarlyBoundTypesFoundException from an EntityTypeCode + /// + /// The searched entity type code + /// The types in which the entity type code was found public MultipleEarlyBoundTypesFoundException(int entityTypeCode, IEnumerable types) { var baseMessage = @@ -44,6 +54,9 @@ private string GenerateLog(IEnumerable types) return log.ToString(); } + /// + /// Returns the message along with the assemblies that caused this exception + /// public override string Message => _errorMessage; } } \ No newline at end of file