简体   繁体   English

是否有可能以编程方式收听动态crm 2011事件?

[英]is it possible to listen to dynamics crm 2011 events programatically?

I want to listen to events via external resource and not via the GUI event tool. 我想通过外部资源而不是通过GUI事件工具来监听事件。

Something like. 就像是。

entity.onSave(myFunc) entity.onSave(myFunc的)

Is it possible? 可能吗?

You can add an onSave event handler via this call: 您可以通过此调用添加onSave事件处理程序:

Xrm.Page.data.entity.addOnSave(myFunc)

Of course you'll still need to call this code from the OnLoad to wire it up. 当然,您仍然需要从OnLoad调用此代码来连接它。

You can also do onChange events on attributes as well 您也可以对属性执行onChange事件

Xrm.Page.getAttribute(controlName).addOnChange(onChange)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM