动态CRM功能区动作序列顺序

时间:2022-06-08 07:37:26

We have a ribbon button that has two actions on it.

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

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.

The issue is sometimes the email is sent by Action 1 before the email is saved. I would think the out-of-box email.js code would always send before saving. We have tried to re-save in our custom code but sometimes it's too late the email has already been sent and user edits are unsaved.

问题有时是电子邮件在保存电子邮件之前由操作1发送。我认为开箱即用的email.js代码总是在保存之前发送。我们已尝试重新保存自定义代码,但有时已经发送电子邮件已太晚,用户编辑未保存。

It's as if since javascript in CRM 2013 executes asynchronously the actions intermittently occur in the wrong order.

这就好像因为CRM 2013中的javascript以异步方式执行,操作间歇性地以错误的顺序发生。

Does Microsoft support multiple actions on a ribbon button.

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

Is there a way to force a execution order?

有没有办法强制执行订单?

Does the Microsoft script email.js always save before sending.

Microsoft脚本email.js是否始终在发送之前保存。

1 个解决方案

#1


0  

Are you extending the "Send" button? If yes, I am not sure that this is supported.

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

A little less elegant solution might be implementing an OnChange event-handler for the fields you need to have saved. This should ensure that the data is saved right after modification.

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

#1


0  

Are you extending the "Send" button? If yes, I am not sure that this is supported.

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

A little less elegant solution might be implementing an OnChange event-handler for the fields you need to have saved. This should ensure that the data is saved right after modification.

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