Hello Everyone,
Recently, we upgraded Webcon from 2021 version to 2022 version. New version 2022.1.4.326.
I have this html content in one of HTML field in Webcon:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a id="RabenCopyToClipboard"><button id="CopyClipboard" class="btn btn-md hide-on-sidebar-dash"
onclick='
Promise.all([window.webcon.businessRules.executeBusinessRule(12909, "ClipboardRule", uxContext, {})]);
document.getElementById("RabenCopyToClipboard").remove();
return;
'><i class="fa fa-copy"></i></button>
</a>
the purpose of this is to run bussinessRule.
But in new version it looks like there is no uxContext
function executeBusinessRule(ruleId, ruleName, uxContext, params) {
let formModel;
let formInfo;
window.Injector.resolve(['ModelController', 'FormInfo'], function(modelController, form) {
formModel = { ...modelController.getDataModel(), uxRuleParams: params };
formInfo = form;
});
i got error:
view?returnurl=%2Fdb%2F1%2Fapp%2F68%2Freport%2F225:2 Uncaught ReferenceError: uxContext is not defined
at HTMLButtonElement.onclick (view?returnurl=%2Fdb%2F1%2Fapp%2F68%2Freport%2F225:2:86)
i checked also console.log(window.uxContext) - it is the same situation.
Do you know how it was changed and maybe how to replace it ?