I use page load snippet very often to warn users of pertinent information on the page. In this example we want to warn users when they get to a Utility Account where the “Do Not Enroll” checkbox is checked. It looks something like this:
(function(skuid){ var $ = skuid.$;
$(function(){
var uaRow = skuid.model.getModel(‘UtilityAccount’).getFirstRow();
var pageTitle = $(‘#MyPageTitle’);
var editor = pageTitle.data(‘object’).editor;
if(uaRow.Do_Not_Enroll__c){
editor.handleMessages([{message:‘Utility Account is set to “Do Not Enroll”’, severity:‘WARNING’}]);
}
});
})(skuid);
It works great however in this exapmle if the user changes the checkbox to false, the page does not reflect that change and the warning stays at the top of the page until the user reloads. I understand that obviously it is a page load snippet and therefore is not dynamic, however… It would be great if there was a way to rerun it after an update to the field that it is based off of. Is there a way to have the page load snippet refresh itself? Maybe via a listener… ?
Question
Update page load snippet
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


