Enforce max number of rows displayed in lists

might be needed for performance reasons

to do this: go to system properties > UI properties > edit the "Items per page' drop-down options (comma separated, no spaces):" box


fix script to tidy up old user preferences:
--------------------------------------------------

updatePreferences('name=rowcount^value>=20^value!=20');
updatePreferences('value=100');

function updatePreferences(sQuery){
var grUserPreferences=new GlideRecord('sys_user_preference');
grUserPreferences.addQuery(sQuery);
grUserPreferences.query();
gs.print('TOTAL: ' + grUserPreferences.getRowCount());
//grUserPreferences.setValue('rowcount',  '20');
//grUserPreferences.updateMultiple();
while (grUserPreferences.next()){
grUserPreferences.value='20';
grUserPreferences.update();
gs.print(grUserPreferences.user.name + ' updated');
}
}


Comments

Popular posts from this blog

Running transform maps asynchronously

Post a command to the ECC queue for the mid server to initiate a powershell file copy

GlideRecord setValue