How to override the Script Include QuickLinkUtilSNC by using the QuickLinkUtil script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2023 04:38 AM - edited ‎07-03-2023 05:25 AM
I am trying to configure to get the quick link card in the portal depending on the logged in user's role in the Employee center portal. I have HR, IT, Finance, Procurement and Work place, when a HR Admin logs in he has to see only the quick link of HR.
Tried overriding the OOTB QuickLinkUtilSNC Script Include via QuickLinkUtil script include. I am trying to override the fetchQuicklinksForHomePage function but I am unsuccessful.
So far all my efforts have not been successful. Can someone please just give me a little guidance on the code where I should add the override and what it should look like and include?
Below is the script for easy reference:
var QuickLinkUtil = Class.create();
QuickLinkUtil.prototype = Object.extendsObject(QuickLinkUtilSNC, {
initialize: function() {
QuickLinkUtilSNC.prototype.initialize.apply(this, arguments);
},
type: 'QuickLinkUtil'
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2023 05:13 AM
Hi @Bhoomika M ,
You just need to declare the function as in the SNC script include and add your logic, it will automatically override the SNC script include. Lets say you want to override fetchQuicklinksForTopic function, it will be as follows, no other changes needed.
//your new logic
},
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2024 09:08 AM
@Aman Kumar S After making changes which SI we need to call, the custom SI in which we are overriding the OOTB function or the OOTB (SNC).