I have written Dynamics CRM JScript code to populate fields based on previous input, but while running the script I am getting error as "Web resource method does not exist".
**My code: -**
var B_line = window.B_line || {};
(function() {
this.formOnLoad = function(executionContext) {
const formContext = executionContext.getFormContext();
const businessarea = formContext.getAttribute("new_buniessarea21").getText();
const businessline = formContext.getControl("new_businessline21");
function Options() {
businessline.clearOptions();
for (var i = 0; i < arr.length; i++) {
businessline.addOption({
value: arr[i].value,
text: arr[i].text
});
}
}
```
}).call(B_line)
I using this command B_line.formOnLoad to call the function OnChange of the event.
Showing error as "Web resource method does not exist"
Can anyone help me out?
Error image