Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Permalinks for articles published in multiple portals

Michael Todd
Tera Contributor

Hi all, have a requirement to generate permalinks that can be shared with users of different portals.

 

Scenario

We have a knowledge base containing technical articles about our products. The knowledge base is included in our employee portal (/sp) as well as our client facing portal (/csm). So far so good. The issue arises when an employee uses the OOTB "copy permalink" and tries to share with a client - because the permalink contains the portal ID, it directs the client to the /sp version and they obviously cannot authenticate against that portal.

 

For example, permalink for KB0001234 on /sp would be:

https://<instancename>.servicenow.com/sp?id=kb_article_view&sysparm_article=KB0001234

 

Whereas, on /csm it would be:

https://<instancename>.servicenow.com/csm?id=kb_article_view&sysparm_article=KB0001234

 

Is anyone aware of a solution to this? Perhaps using an additional "copy permalink" option for the csm portal.

 

Appreciate any ideas for this.

Cheers,

Mike.

2 REPLIES 2

SVimes
Kilo Sage

The kb_article_view portal page dynamically generates a link using the c.copyPermalink function in the Knowledge Article Content widget. If this is the experience employees have and need to copy from here, you could clone the widget and add some HTML and client controller scripting that provides a link in the required format. You would need to replace the widget currently on the page with the cloned one, or create a new page entirely and add a page route map to point to the new page instead of the OOTB version. I highly recommend not making any changes to the OOTB widget.

Sable Vimes - CSA

Thanks for the guidance Sable. I can see the function in the client controller, so your solution would seem to be sound. I will post back once we've got this working for the benefit of other community members.