最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Dynamics CRM SQL 实体ObjectTypeCode查询&表单共享用户的查询

业界 admin 5浏览 0评论

1.实体ObjectTypeCode查询

SELECT [ObjectTypeCode] FROM Entity WITH(NOLOCK) WHERE name='EntityName'

2.表单共享用户的查询  

--PrinciplId是SystemUserId
SELECT PrincipalId,PrincipalTypeCode,AccessRightsMask
FROM PrincipalObjectAccess  WITH(NOLOCK) 
WHERE  
OBJECTTypeCode= (SELECT [ObjectTypeCode] FROM Entity WITH(NOLOCK) WHERE name='EntityName')
AND ObjectId='EntityRecordId'

 

1.实体ObjectTypeCode查询

SELECT [ObjectTypeCode] FROM Entity WITH(NOLOCK) WHERE name='EntityName'

2.表单共享用户的查询  

--PrinciplId是SystemUserId
SELECT PrincipalId,PrincipalTypeCode,AccessRightsMask
FROM PrincipalObjectAccess  WITH(NOLOCK) 
WHERE  
OBJECTTypeCode= (SELECT [ObjectTypeCode] FROM Entity WITH(NOLOCK) WHERE name='EntityName')
AND ObjectId='EntityRecordId'

 

发布评论

评论列表 (0)

  1. 暂无评论