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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Solution XML: Entity behavior attribute changing after components added

(0) ShareShare
ReportReport
Posted on by 35

I came across an odd issue I'm hoping someone else has seen...

I have the contact entity in my solution and it's renamed to "Client". Recently I realized that in deployment, it is not renamed. After a bit of digging it's because in the solution XML it looks like this - the "behaviour" is equal to 2 which as far as I can tell, is the same as NOT selecting "Include Metadata" when adding an entity:

<RootComponent type="1" schemaName="contact" behavior="2" />

Assuming it's because someone had accidentally unchecked the metadata option during create, I removed and re-added the entity, definitely leaving metadata checked (and only adding select sub-components), however when exporting again the value in the solution.xml is still 2. I then repeated the process but this time didn't add any sub-components when adding the entity (with metadata). Exporting that solution showed that behavior stayed at "1" in the XML.

I then went and gradually added each type of sub-component to contact and exported in between. To cut a long story short, as soon as I add relationships, the behavior value changes to "2" on export. After adding fields it was still 1 and same after adding forms and views in turn. I can't figure out why that would be the case. Anyone?

I have the same question (0)
  • Suggested answer
    Ankit Sabharwal Profile Picture
    on at

    Hy Partner,

    Hope this post finds you well. 

    When you add the relationship behavior value changes to 2 , because relationship only needs a shell of the entity and not all entity properties, but if we talk about fields, forms , those are dependent on entity, thus behavior is 1.

    Below article will explain as well :-https://bettercrm.blog/2017/04/26/solution-component-types-in-dynamics-365/

    Hope this helps.

    Best regards,

    Ankit

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

     

  • RichyRich Profile Picture
    35 on at

    Thanks for the reply Ankit but no, that wouldn't explain it - as I said there are many more sub-components than just relationships in the entity, and my solution has many other entities (e.g. account) where this behavior is not happening.

    That blog post just mentions the behavior attribute - doesn't actually go into any detail on how it reacts to changes in components. I know because I already found it and many others - I'm very handy with Google!

  • Suggested answer
    RichyRich Profile Picture
    35 on at

    So I think I understand why it's suddenly changing to not including metadata and it's kind of obvious - when adding sub-components, the "Include metadata" checkbox is always on the dialog, however it's normally set to the value that was set previously so you save the new components and nothing changes.

    In this case, even though it was most definitely set to yes before, when bringing up the dialog for relationships, it is blanked out, so saving those additional components un-sets the include metadata attribute on the entity. This is odd - I've normally never seen this "become unset" on its own - we often add sub-components and never have to check this. I guess it's just something we'll have to watch out for but it does seem like there's a bug somewhere.

    pastedimage1582545360833v1.png

Under review

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

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

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

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 36 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans