2

I've got two different CRM endpoints who's Entity Metadata is completely identical except for a couple Option Sets (don't ask why). This morning I switched the early bound URL used in the CrmServiceUtil from Endpoint 1, to Endpoint 2. Upon doing a diff on checkin, I noticed that quite a few entities have had their EntityTypeCode changed. I haven't noticed an issue as of yet, but I'm wondering if I need to spend some time forcing the EntityTypeCodes to match.

Does anyone know what these EntityTypeCodes are used for (I assumed that everything worked off of the EntityLogicalName), and if using early bound classes where the EntityTypeCodes don't match what is in CRM will cause an issue?

Matt
  • 4,656
  • 1
  • 22
  • 32
Daryl
  • 18,592
  • 9
  • 78
  • 145

1 Answers1

3

The EntityTypeCode is used for reference a entity and is normal you have different entity type codes between organizations a good example is between environments (DEV, QA, PROD).

The LogicalName is best way to avoid this differences, you have be careful with the next situations:

  • Reference the url forms, for example main.aspx?etc=1 with logical name main.aspx?etn=account
  • When you create a EntityReference

By now is only that but if i remember more i will update.

Pedro Azevedo
  • 2,507
  • 1
  • 16
  • 22