Javascript 动态CRM功能区动作顺序

Javascript 动态CRM功能区动作顺序,javascript,email,dynamics-crm,dynamics-crm-2013,Javascript,Email,Dynamics Crm,Dynamics Crm 2013,我们有一个功能区按钮,上面有两个操作 Action 1) /_static/activities/email.js (this is out of the box) Action 2)/Sage/WebResources/sage_ProcessLogic (this is custom logic) Action 2 performs several business rules and checks and then closes the Email Editor window. 问

我们有一个功能区按钮,上面有两个操作

Action 1) /_static/activities/email.js  (this is out of the box)

Action 2)/Sage/WebResources/sage_ProcessLogic (this is custom logic)

Action 2 performs several business rules and checks and then closes the Email Editor window.
问题是,有时在保存电子邮件之前,通过操作1发送电子邮件。我认为开箱即用的email.js代码总是在保存之前发送。我们已尝试在自定义代码中重新保存,但有时电子邮件已发送且用户编辑未保存已为时已晚

这似乎是因为CRM 2013中的javascript异步执行,所以操作会以错误的顺序间歇性地发生

Microsoft是否支持功能区按钮上的多个操作

有没有办法强制执行命令


Microsoft脚本email.js是否总是在发送前保存。

是否扩展“发送”按钮?如果是,我不确定这是否得到支持

一个不那么优雅的解决方案可能是为需要保存的字段实现OnChange事件处理程序。这应确保数据在修改后立即保存