We have CRM 2011 on premises. I am trying to cancel a contract detail without cancelling its parent contract.
Questions:
1) I found this code online:
TargetDeleteContractDetail target = new TargetDeleteContractDetail(); target.EntityId = new Guid(someGuid); DeleteRequest delete = new DeleteRequest(); delete.Target = target; DeleteResponse deleted = (DeleteResponse)service.Execute(delete);
but TargetDeleteContractDetail is not coming up as a valid class. In what namespace and in what dll does it reside?
2) Is there an alternate way of accomplishing this?
3) We have a custom entity, call it "D", which has an N:1 relationship with Contact. D also has a relationship with a Contract Detail, call it "CD", as follows, where "X" is an entity that just connects the two.
When I cancel the contractdetail, I also have to delete all entity records X, that connect to all entity records D for that Contract Detail.
Please advise how to accomplish this.
Thank you.