- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 06:28 AM
Hi everyone I have a requirement to make a UI Action that when clicked, it will redirect the user to the knowledge article form so that the user can create a new article, does anyone know's how to make this redirect dinamic ?
(without a hardcoded url)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 09:03 AM
Thanks,
That UI action you copied is specific to the 'Incident Management for Service Operations Workspace' scope, so if you've copied the code and are running it in a different scope (for example global) you'll end up with an error and the UI action failing.
Change
new SOWIncidentKnowledgeUtils().getNewKnowledgeArticleLink(current);
to
new global.IncidentKnowledgeUtils().getNewKnowledgeArticleLink(current);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 09:03 AM
Thanks,
That UI action you copied is specific to the 'Incident Management for Service Operations Workspace' scope, so if you've copied the code and are running it in a different scope (for example global) you'll end up with an error and the UI action failing.
Change
new SOWIncidentKnowledgeUtils().getNewKnowledgeArticleLink(current);
to
new global.IncidentKnowledgeUtils().getNewKnowledgeArticleLink(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 01:23 AM
I ended up using other code, but I tried to do this change that you recomended and it also worked