Dynamics CRM-用户登录时注册插件 [英] Dynamics CRM - Register a plug-in when the user logs in

查看:198
本文介绍了Dynamics CRM-用户登录时注册插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在用户登录Dynamics CRM上的帐户时触发一个事件吗?例如在CRM旁边打开Web应用程序...这可能吗? 我知道我可以编写插件来扩展一些业务流程,例如帐户创建.任何建议将不胜感激!

I would like to fire an event when the user logs in to his account on Dynamics CRM ? Such as opening a Web App beside the CRM... Is This possible ? I know that I can write plug-in that allows to augment some business process such as account creation. Any advice will be appreciated !

推荐答案

CRM不会公开"UserLogon/UserAccess"的插件消息,您可以在该消息中注册插件.

CRM does not expose a plugin message for "UserLogon/UserAccess" on which you can register a plugin.

尽管可以做的是启用审核用户访问权限,然后在审计实体的Create中注册您的插件,并根据AuditAction(操作)中的值进行过滤,而User Access Via Web (64)是您要查找的值.

What you could do though is enable Audit User Access and register your plugin on Create of an audit entity and filter on the value in AuditAction (operation) and User Access Via Web (64) is the value you are looking for.

var entity = ((Entity)pluginExecutionContext.InputParameters["Target"]).ToEntity<Audit>();
if (entity.Operation.GetValueOrDefault() == 64)
{
   //logic here
}

这篇关于Dynamics CRM-用户登录时注册插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆