I want to delete a set of entities in CRM 2011 by a attribute value. Ex. delete * from contacts where ContactId = "guid"...
How can I do this using the IOrganizationService?
Stig
You have two possibilities
Retrieve all records with a QueryExpression which you would like to delete. Iterate over this collection and call IOrganizationService.Delete
for all of them.
You could run a BulkDeleteRequest
which runs the deletion as a background task. See how to run a bulk delete or the Sample: Bulk Delete Records That Match Common Criteria