Hello,
I have some code that checks for a checkbox value on load of the page and if the checkbox is checked, I am disabling a link lookup field. However after I disable the link lookup field, it re-enables back again. I do not have any other code that does the enabling/disabling of this field.
Here is the code:
$("document").ready(function () { var linklookupdropdown = rbf_getFieldContext("linklookupdropdown").getKendoConfig(); //If checkbox is checked then disable link lookup field if (rbf_isChecked('checkboxfield')) { linklookupdropdown.enable(false); } else { linklookupdropdown.enable(true); } });
Please let me know if there are any issues with this. I think this is a bug.
Cheers.
Iram
Hi Iram,
I tried this which seems to be working for me. Can you try putting your script inside "rbs_pageRender" custom event callback, something like below
rb.newui.util.addEventListener("rbs_pageRender",function(){});
If still doesn't work , please let us know.
Thanks,
Vimal.
Hi Iram,
I tried this which seems to be working for me. Can you try putting your script inside "rbs_pageRender" custom event callback, something like below
rb.newui.util.addEventListener("rbs_pageRender",function(){});
If still doesn't work , please let us know.
Thanks,
Vimal.
Since we have implemented Ajax loading you need to use the construct below and not document ready anymore
<script>
try {
if (!rbf_isNewUI()) {
throw 'This Script is written for New UI';
}
var onLoad = function () {
if(console){
console.log("Execute on page load ");
}
};
rb.newui.util.addEventListener(rb.newui.util.customEvents.rbs_pageRender, onLoad); //instead of document.ready(onLoad) or $(onLoad);
}
catch (err) {
if (console) {
console.log(err);
}
}
</script>
Yes it was the issue with document.ready(). I think you are using the document.ready event to set the link lookup. Changing the load function to rbs_pageRender has fixed the issue.
Thanks.