简体   繁体   中英

Dynamics CRM Ribbon Action Sequence Order

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.

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

Does Microsoft support multiple actions on a ribbon button.

Is there a way to force a execution order?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM