将订单转换为自定义实体“X”
问题是:
我有一个名为“Order”的系统实体和另一个自定义实体“X”。我正在寻找某种与报价上可用的功能相同的功能,称为“转换为订单”。我希望订单表单上有相同的功能,上面会有一些按钮,当我单击它时,它将创建实体“X”的实例,不仅如此,它还将传输订单和“X”的所有映射属性',在'X'形式上。
任何人都可以分享他的经验或实施这一步骤的步骤吗?
非常感谢。
Issue is :
I have one system Entity called 'Order' and another custom entity 'X'. I am looking for some kind of same functionality as available on Quote called 'Convert into Order'. I want the same functionality on Order form that there will be some button on it and when i click on it, it will create instance of entity 'X' and not only this, it will also transfer all the mapping attributes of Order and 'X', on the 'X' form.
Can any one share his experience or step to implement this?
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须使用 JavaScript 并在单击新按钮时调用 CRM Web 服务。
因此,您不必在 JavaScript 中映射实体的属性,您可以使用 InitializeFromRequest 达到相同的结果。我使用这种方式以编程方式限定/取消潜在客户资格,并将其转换为联系人、客户和机会。
CodePlex 上有一个很好的示例代码:
http://www.codeproject.com/KB/cs/CRM_30___EntityMoniker.aspx
请注意,此代码有一个错误。检查罗纳德的帖子以获取快速修复:
http://ronaldlemmen.blogspot.com/ 2008/09/convert-lead-to-contact-account-andor.html
You would have to use JavaScript and call CRM web services on click of new button.
So you don't have to map your attributes of your entities in JavaScript, you could use InitializeFromRequest to achieve same result. I have used this way to programmatically qualify/disqualify leads and convert them to contact, account and opportunities.
There is a nice sample code for this on CodePlex:
http://www.codeproject.com/KB/cs/CRM_30___EntityMoniker.aspx
Please note, this code has a bug. Check Ronalds post for quick fix:
http://ronaldlemmen.blogspot.com/2008/09/convert-lead-to-contact-account-andor.html
Yuo 可以使用按需触发的工作流程来完成此操作。只需创建一个针对订单实体的工作流程,第一步通过复制传入的订单实体中的值来创建一个新实体 X。
如果您希望执行此操作的选项显示在“更多操作”菜单下而不是工作流程菜单下,那么您可以编辑 isv.config 文件。
Yuo could do this using an on demand triggered workflow. just create a workflow targting the order entity, have the first step create a new entity X by copying the valuses from the passed in order entity.
if you want the option to do this to show under the more actions menu instead of teh workflows one then you can edit the isv.config file.