Crm dynamics custom action after clicking Invoice Paid

依然范特西╮ 提交于 2019-12-10 14:32:11

问题


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?


回答1:


Yes. There are two separate ways I can think of to do this:

  1. 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.

  2. 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 the StateCode 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.



来源:https://stackoverflow.com/questions/7514625/crm-dynamics-custom-action-after-clicking-invoice-paid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!