Actions on Objects

The following table describes the actions allowed on objects in general. Not all actions are allowed on all objects. For complete details, see the API Reference section.

Action Description
Append Objects can be added to the object in question. For example, a note can be added to an opportunity if the caller has Append rights on the opportunity.
Append To Append To is the opposite behavior from Append. In this case, the object in question can be appended to another object. For example, a note can be attached to an opportunity if the caller has Append To rights on the note. (Append To can also be thought of as “Attach”).
Share The Share action allows a caller to grant or revoke access to an object to another user or team. Sharing is done using the GrantAccess, ModifyAccess and RevokeAccess methods.
Assign The Assign action changes ownership of the target object. In the Microsoft CRM platform, many objects can be owned by either users or teams (the exception is objects that can be routed, such as activities and cases). The Microsoft CRM application does not allow teams to own objects.

When an entity is assigned to another user, the previous owner will still have access to this entity. However, they no longer have ownership of the entity, but they do share the entity.

Delete This action deletes an object. For some objects, you are given the choice of deleting all child objects as well.
Retrieve This action retrieves an object from the database.
Update The Update action allows you to modify the contents of an object.
Create Although Create is not an object-level action, it is included here for completeness. Create is done at the class level.

Creating Objects

To create an object you need to have create privileges for the class of objects. However, there are more privileges you need in order to own an object. For example, if you have security access CRM_ACCESS_CREATE for accounts, you can create an account object and assign it to another user. However, unless you also have CRM_ACCESS_READ access for accounts, you cannot create an account and be the owner of that new account. For more information, see the Security Dependencies section.

Sharing Objects

Sharing is the way Microsoft CRM users can give other users access to customer information on an individual basis. For example, a salesperson might choose to share an opportunity with another salesperson so that they can both track the progress of an important sale.

The Microsoft CRM SDK provides methods for sharing objects. A user must have Share rights to share customer-related objects, such as Contacts Accounts, Opportunities, Cases, and Orders, with any other user in the system. When an object is shared, you can specify the rights to grant for the shared object. You can also choose to share all objects associated with the object being shared.

The following describes the rules for sharing objects:

  • Anyone with share privileges on an object can share it with additional users or teams.
  • Anyone with share privileges on an object can set privileges for that object that controls how a user can access the shared object.
  • Access on a shared object can be set to any access privilege.
  • Access privileges on a shared object can be different for each user it is shared with.
  • An object can be shared with the same security principal only once. A user can share an object if they have share privileges on that object.
  • Anyone with share privileges on an object can modify the access privileges for users with which that object has been shared.
  • Anyone with share privileges on an object can remove sharing for a user with whom the object was previously shared.
  • Anyone with share privileges on a business object can remove sharing for all users with whom the object was previously shared.

Deleting Objects

The following rules apply to deleting objects:

  • Deleting an object removes all appended objects.
  • Deleting an object does not remove other objects with simple associations to that object.
  • If you want to delete an account or contact, the platform checks for the user's privileges and for an object state, such as an open contract. If the outcome of the checks is success, the platform removes all of the objects in the parent hierarchy. If the outcome of the checks is failure, the platform removes neither the account nor contact.

Note   When deleting an object using the class library or Microsoft CRM, the object is marked for deletion and only later removed from the Microsoft CRM server by the deletion service. However, as a developer, you do not need to consider the deletion service because deleted objects are not returned from retrieve methods and cannot be updated. The deletion service is analogous to the garbage collector in the common language runtime.

© 2005 Microsoft Corporation. All rights reserved.