单击“发票已付”后的 Crm 动态自定义操作
在 MS CRM 中,当用户单击“发票已支付”时,我需要通知外部站点该发票已支付 有可能实现这个目标吗?
In MS CRM When user clicks Invoice Paid, I need to notify external site that this invoice was paid
Is this possible to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。我可以想到两种不同的方法来执行此操作:
隐藏和通过 CRM 的 RibbonXML 重新创建发票已付款按钮,并使用您自己的 javascript 方法将发票状态更改为“已付款”,并与外部站点通信。只要将发票状态更改为“已付款”的唯一方法是通过“发票已付款”按钮,此操作就有效。
当您点击已付款发票时,该发票的
StateCode
属性值将更改为“已付款”,即值为 2。因此,您还可以 注册一个在发票更新消息上触发的插件,并检查之前的内容和之后的属性实体以查看StateCode
是否不等于 Pre Image 且等于 发布图像。这将是一个服务器端解决方案,无论发票付款操作如何触发,都可以工作,并且还允许您访问 .NET 框架。Yes. There are two separate ways I can think of to do this:
Hide and recreate the Invoice Paid button via the CRM's RibbonXML and use your own javascript methods to change the status of the invoice to "Paid" and also talk to the external site. This would work so long as the only way the Invoice's status is changed to Paid is via the Invoice Paid button.
When you click the invoice paid, the value of the
StateCode
property of the Invoice changes to "Paid", which is a value of 2. So, you can also register a plugin that fires on the Update message of the Invoice and check the before and after properties of the entity to see if theStateCode
was not equal to "Paid" in the Pre Image and equal to "Paid" in the Post Image. This would be a server-side solution and would work no matter how the Invoice Paid action was triggered, and also gives you access to the .NET framework.