Sunday, February 6, 2011
Sharing Records in CRM Using DB Scripts
When you share a record with a team or a user do you know where it is stored in the database? The entity name is PrincipalObjectAccess. This is the entity which stores the shared information.
I have stated below the columns which will have to be populated in this table.
This field stores information regarding Team/User guid that the record will be shared with.
This field stores information regarding whether the record is shared with a team or a user.
Team – Value is 9
User – Value is 8
This field stores information regarding the record that is being shared with a user/team
This field stores information regarding the shared record entity type code.
e.g.: account – 1
Contact – 2..etc…..
Type of share
e.g.: - read, write
These are the important fields to remember.
SQL script to do this is given below.
INSERT into PrincipalObjectAccess ( PrincipalId, PrincipalTypeCode, ObjectId, ObjectTypeCode, AccessRightsMask,
Values (guid, 9, @aID, (select objecttypecode from entity where logicalname ='account'), 786455, 0, GETDATE()
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011We were working on sending emails programmatically using CRM and all were working fine. Suddenly we got this error when we tried to send an ...