[TIP 118] - Programmatically Clear Personalization

Personalization is a feature in which view settings such as the state of filters are automatically saved and recalled for each non-administrator user viewing a dashboard, report, or another view. If you’re interested in learning more about personalization, CLICK HERE >>>.

Now, have you ever had the need to programmatically clear personalization from a specific dashboard? Do you want to give your users a button to help them clear their personalization settings? If so, we’ve got just the thing for you!

Here is a sample:

dundas.context.getService(“ShortLinkService”).deleteShortLinks({

categoryId: dundas.constants.VIEW_PERSONALIZATION_SHORT_LINK_CATEGORY_ID,

accountId : dundas.context.currentSession.accountId,

fileSystemEntryId: “04127378-06b1-4e75-bcc6-0a22a29fe40d” //Substitute the value of fileSystemEntryID by your dashboard ID

}).done( function () {

console. log (“Personalization cleared”);

});

3 Likes

Also asked this on the Tip of the Week, copying here for best visibility-- Are these Personalizations able to easily be copied to another user? For example - A user perfects the Personalization of a dashboard for their unique need, but then later leaves the company. Can we copy/paste their Personalization to the new employee that replaces them in order to avoid disruption? (In this situation the SAME dashboard is used by many, and each requires their own Personalization of many filters that are different from the others)

While it isn’t possible to transfer personalization settings of a view from one account to another, an admin should be able to just log in as that dormant user, and then on the dashboard, use the Share > Link feature to create a shortlink that opens the view with the same personalizations and filters the dormant user had set up. Then you can copy it and distribute it to everyone else.

image