I have a Javascript code registered onSave of record. I need to check whether the save operation is happening by clicking on Save button or saving programmatically like Xrm.Page.data.entity.save().
Do we have a JScript code to get the source control of the event, means event generator?
Without this information on the context why not set a variable in the JavaScript function where you call entity.save explicitly? You can then check this from any other JavaScript function to determine "context". It's a bit of a hacky global flag but it'll do the job.
If you need to get a hold of this "context" within a plugin you can create a hidden attribute on the form setting submitMode('always')
that you set prior to save within the custom JavaScript and reset on load.
您是否尝试过类似的方法: https : //community.dynamics.com/product/crm/f/117/t/58773.aspx
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.