简体   繁体   English

Dynamics CRM 2011自定义代码

[英]Dynamics CRM 2011 custom code

I'm struggling to find much documentation on Dynamics CRM 2011 and have a problem. 我很难找到有关Dynamics CRM 2011的大量文档并遇到问题。 I'm not looking for code more a pointer as to the correct method of approach (workflow, dialog, custom HTML web resource etc) 我不是在寻找代码更多指针正确的方法(工作流,对话框,自定义HTML Web资源等)

I basically want something that does the following: 我基本上想要做以下事情:

  • Go to Contact list 转到联系人列表
  • Select some contacts 选择一些联系人
  • Ribbon action opens a box that allows me to select a custom role from a drop down list (source is a dynamics entity) 功能区操作会打开一个框,允许我从下拉列表中选择自定义角色(源是动态实体)
  • Select a radio box for either add or remove role 选择添加或删除角色的单选框
  • Save the changes, this will add or remove a role from the contact and also send an email to that contact 保存更改,这将添加或删除联系人中的角色,并向该联系人发送电子邮件

I know how to get a list of selected recordIDs but I am not sure if I should be calling a dialog or a custom HTML page with JS. 我知道如何获取所选记录ID的列表,但我不确定是否应该使用JS调用对话框或自定义HTML页面。

Can anyone point me in the right direction? 谁能指出我正确的方向?

This may not work at all for your scenario but it is worth thinking out of the box sometimes. 这对于您的场景可能根本不起作用,但有时候开箱即用。 This would only work if you have a small number of roles and the roles don't change that often. 这只有在您拥有少量角色并且角色不经常更改时才有效。

Add checkboxes on the Contact, one for each role. 在联系人上添加复选框,每个角色一个。 Build workflows that fire on update of those checkboxes that send your emails. 构建在更新发送电子邮件的复选框时触发的工作流程。 Now users can quickly edit lots of Contact Roles by using the Multi-Edit feature. 现在,用户可以使用“多编辑”功能快速编辑大量“联系人角色”。

The benefit of this approach is it is a "no code" solution and it is very easy for the User since it uses out-of-the-box functionality. 这种方法的好处是它是一种“无代码”解决方案,对用户来说非常容易,因为它使用了开箱即用的功能。 The downside is that you need to maintain those checkboxes. 缺点是您需要保留这些复选框。 But it may be easier than writing a bunch of web resources and javascript! 但它可能比写一堆网络资源和JavaScript更容易!

In the end the solution was to create a Ribbon item that accepted the selected Guids from the contact list. 最后,解决方案是创建一个Ribbon项目,该项目从联系人列表中接受选定的Guid。

Then read those in from a web resource (Silverlight) which called into the sdk and created / removed the records accordingly 然后从Web资源(Silverlight)中读取这些内容,这些资源调用了sdk并相应地创建/删除了记录

I have assembled a list of bookmarks on the subject here . 我已经组建了关于这一主题的书签列表在这里 I hope the link works. 我希望链接有效。
Gareth Tucker's site is specially interesting. Gareth Tucker的网站特别有趣。

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

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