Nozim
Nozim

Reputation: 597

Dynamics CRM 2011 SDK remove attribute with dependencies

I'm having troubles with removing the attribute of entity which have dependencies from SDK. To remove an attribute I need:

  1. RetrieveAttribute
  2. RetrieveDependenciesForDeleteRequest
  3. DeleteRelationshipRequest
  4. and finally DeleteAttributeRequest

I would be appreciated for any advise about the plan above or sample code. I couldn't find example at msdn so far.

Upvotes: 2

Views: 2037

Answers (1)

Jim Daly
Jim Daly

Reputation: 161

So it appears that the RetrieveDependenciesForDeleteRequest is telling you that you have to delete a relationship before you can delete the attribute; and you are doing so.

I expect that this is a look-up attribute?
Is it visible in the entity form?

You won't be able to delete the attribute as long as the entity form has a dependency on it.

Upvotes: 2

Related Questions