Finding all the opportunities shared with the user in CRM

Posted: September 17, 2007 in Microsoft Dynamics CRM, SqlServer Reporting Services
Tags:

To find the opportunity record shared with a particular user in Microsoft Dynamics Crm

select o.name as OpportunityName,p.AccessRightsMask from opportunityBase o
left join PrincipalObjectAccess
p on p.objectid=o.opportunityid left join systemuser u
on p.principalid=u.systemuserid where u.fullname=’nishant r’

or u.domainname=SYSTEM_USER

AccessRightsMask values and what they mean

AppendAccess 4 - Specifies the right to append the specified object to another object.
AppendToAccess 8 - Specifies the right to append another object to the specified object.
AssignAccess 0×80 -Specifies the right to assign the specified object to another security principal.
CreateAccess 0×10 -Specifies the right to create an instance of the object type.
DeleteAccess 0×20 -Specifies the right to delete the specified object.
ReadAccess 1 -Specifies the right to read the specified type of object.
ShareAccess 0×40 -Specifies the right to share the specified object.
WriteAccess 2 - Specifies the right to update (write to) the specified object.

3- Read + Write

65539- Read + Write + Delete

851991- All the rights

262145- Share+Read etc…

फिर मिलते हें
Bye

Comments
  1. Isaac says:

    Hi

    this is great!!

    I wonder, how do i find the user whom the opportunity was shared with ?

    I need to create a worklfow which sends an e-mail to the to both the owner and the shared user.

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s