Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Object type code changes when taking newly created entity from source org to target org using solution package

Posted on by Microsoft Employee

Hello, 

I have two environment, Dev and Test, Now i have created an entity in dev and when i moved that entity to Test using standard procedure of solution, Its Object Type Code changes. I.e. in Source its object type code was 10177 but in target its 10175. when i checked the customization.xml of solution zip, it contains objecttype code 10177 now naturally it should take object type code as 10177 but it takes in order as i can see, w.r.t other object type code in entityview table in target organization. Also i see all the entities' entityId are same in source and destination but it differes in case of the entity i have just migrated using solution. Since Customization.xml does not contains entityid, how entity ids are been preserved in source? and how on earth the object type code is not being preserved between source and target?

*This post is locked for comments

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Object type code changes when taking newly created entity from source org to target org using solution package

    Hi Manish,

     Unless you are pushing data directly to the database, data integrity should not be an issue - dynamics web service methods(web api, sdk as well) are using entity names.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Object type code changes when taking newly created entity from source org to target org using solution package

    Object type code for custom entity unlikely will be the same across the environments. We normally use entity logical name to reference the entity type instead of using object type code. You need to have some global configuration values to store the object type code if you need to do use it anywhere in your application, be it data migration or some other custom web application.

    What data replication you are using? Are you using some third party CRM adapter or your custom build adapter?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Object type code changes when taking newly created entity from source org to target org using solution package

    Hi Alex, thanks for the reply.

    Actually. i am doing data migration from one organization to another and in order to two organization keeping in sync we are replicating customization which are done in source organization to target organization. Now, from source to target if my Object type code will be changed that will impact my data integrity. e.g. if i have entity which is being moved, in regarding field of task/email/phonecall, now in email record i would end up with Object type code "X" in source while in destination it would be "Y", don't you think that will cause issue??

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Object type code changes when taking newly created entity from source org to target org using solution package

    Hi Manish,

     entity type codes are not preserved during solution import. There is a set of out of the box entities for which the type codes are always the same(such as account, lead, contact, etc), but, other than that, they are generated in each organization whenever an entity is first created there.  

Under review

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

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans