Dynamics CRM 2011插件检索和检索多个 [英] Dynamics CRM 2011 Plugin Retrieve and Retrieve Multiple

查看:83
本文介绍了Dynamics CRM 2011插件检索和检索多个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一些检索消息和检索多消息插件(早期绑定)的工作示例.我没有找到任何成功的例子.我已经检查了SDK和各种论坛.链接或工作示例将不胜感激!

I'm looking for some working examples of retrieve message and retrieve multiple message plugin (Early binding). I've failed to find any successfully examples looking on line. I've checked the SDK, and various forums. Links or working examples would be greatly appreciated!

我要完成的工作是在UI上呈现之前,对特定字段进行拦截和更新.我可以通过javascript来部分完成此操作,这是首选方法,但是不幸的是,无法以这种方式处理网格等中的演示.

What I'm trying to accomplish is the intercept and update of specific fields before presentation on the UI. I'm able to partially accomplish this via javascript which is the preferred method, but unfortunately the presentation in grids etc.. cannot be handled in this manner.

我找到了一个链接在线

在此示例中,他能够拦截消息并更新值,但这似乎仅在汇总6(我在10)上有效.

In this example he's able to intercept the message and update the value, but this appears to only have worked in roll-up 6 (I'm on 10).

与上述发布有关的进一步信息来自 Chaitany

Further related to the above posting is one from Chaitany

在此示例中,他正在实现与后操作类似的解决方案,并从上下文输出参数中获取属性"BusinessEntity".(这使我感到困惑,因为我没有在获取响应我认为这应该是RetrieveResponse的属性.

In this example he is implementing a similar solution as a post-operation and grabbing the property "BusinessEntity" from the context output parameters. (This is confusing to me because I don't see this property defined in the Retrieve Reponse I assume this should be a property of the RetrieveResponse.

最终,我想要一个解决方案,其中拦截检索或检索多个检索结果,调整要显示的值,然后在保存表单后返回.

Ultimately, I'd like a solution where intercept the retrieve or retrieve multiple,adjust the values for presentation and then revert back if the form is saved.

推荐答案

对于restoreMultiple:

For retrieveMultiple:

EntityCollection entities = (EntityCollection)context.OutputParameters["BusinessEntityCollection"];

要获取:

Entity entity = (Entity)context.OutputParameters["BusinessEntity"];

关于取回倍数的很酷的事情是,您在取回中所做的任何调整都将应用于取回倍数.

The cool thing about retrieve multiple is that any adjustments that you make in retrieve will be applied for retrieve multiple.

进行调整后,只需发布​​以下内容:

After adjustments have been made then it's just a matter of issuing the following:

  • xrm.Attach(phoneNumber);
  • xrm.UpdateObject(phoneNumber);

这篇关于Dynamics CRM 2011插件检索和检索多个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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