Hey everyone,
I have managed to write a Loading Script which changes 2 of the default settings when “Sharing”/extracting data into an Excel file (namely - automatically Freeze Header Rows for excel, AND automatically append the date to the file name) which is great as the majority of my users would manually do this themselves.
Should anyone wish to use it the Loading script is below…
However I can’t seem to recreate the same rules for a user setting up a notification? I have scoured through the Script Documentation and can’t find anything specific that would point me in the direction of the user interface, although I am guessing this may be due to the fact that under Notification Content the options seem to be parameters not a UI.
Could anyone suggest how I update the below script so that if a User is setting up a Notification that these would default as “ticked”.
On a secondary note - is there anyway to update all dashboards and reports globally with such a script? Once I had created the below, I had the most tedious task of going through each dashboard and updating the loading script, which is just tiresome…any hints on that would be a life saver before I fall to sleep at my desk
Thank you as always:
var exportService = dundas.context.getService(“ExportService”);
var viewService = dundas.context.getService(“ViewService”)
var getUI = exportService.getCustomConfigurationUI;
exportService.getCustomConfigurationUI = function(providerId){
$(viewService.currentDialogShown).bind(dundas.controls.ExportDialogConstants.loadUICompletedEventName, function() {
$("#" + dundas.constants.APPEND_DATE_TO_FILE_NAME_ID.toUpperCase(), dundas.context.currentDialogShown.contents)[0].checked = true;
})
$(viewService.currentDialogShown).bind(dundas.controls.ExportDialogConstants.loadUICompletedEventName, function() {
$("#" + dundas.constants.EXCEL_FREEZE_HEADER_ROWS.toUpperCase(), dundas.context.currentDialogShown.contents)[0].checked = true;
})
return getUI.apply(this, arguments);
}