简体   繁体   English

如何防止用户使用js取消销售订单?

[英]How to prevent user from cancelling a salesorder using js?

My mission is: after the user clicks on cancel order button, I need to check some data and if the data is true, I need to prevent from the button functionality to run and alert the user, where can I insert my code?我的任务是:用户点击取消订单按钮后,我需要检查一些数据,如果数据为真,我需要阻止按钮功能运行并提醒用户,我在哪里可以插入我的代码?

Mscrm.Form.salesorder.CancelOrder is a vanilla button and seems close to add or edit, how can I do that? Mscrm.Form.salesorder.CancelOrder是一个香草按钮,似乎接近添加或编辑,我该怎么做?

  1. Either you can do a pre-update plugin, check the business logic and throw InvalidPluginExecutionException if it is satisfied要么你可以做一个更新前插件,检查业务逻辑,如果满意就抛出InvalidPluginExecutionException
  2. You can use custom action by customizing the OOB cancel button or by hiding it and introducing a custom cancel button to invoke custom action or script to alert您可以通过自定义 OOB 取消按钮或通过隐藏它并引入自定义取消按钮来调用自定义操作或脚本来发出警报来使用自定义操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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