How to put info message on UI Action instead of redirecting to a URL in HR case 'Create Knowledge' b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 05:20 AM
Hi Team,
I created a Ui Action called 'Create Knowledge' on HR Case Table . after clicking the button it redirects to the article URL.
But my customer wants it to stay on the HR case page and display a info message like
so, how to put those info messages instead of redirect URL.
can anyone please sent the code snippet for it.
Thanks in advance.
Hari Kishan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 06:05 AM
Hi @HARI KISHAN GVS ,
In your UI Action script just use the following statement in place of your if block for redirecting.
gs.addInfoMessage('KB Created');
action.setRedirectURL(current);
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 07:03 AM
Hi Anvesh,
Thanks for the input.
But if i don't have redirect url i can't able to save the knowledge record.
so, How can we add some kind of current.insert(); or Update(); to insert the created/opened/redirected article in the system.
and i need the created article number also in the info message.
Thank you,
Hari Kishan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 07:39 AM
I'm thinking of a Script Include and a function in it to handle the creation of KB Article and return the number/sys_id of the article created.
So that we can call it in the UI Action script and use the returned number in displaying info message.
Thanks,
Anvesh
Anvesh