Show Info Message after redirecting user to a new page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 05:29 AM
Hi All,
On a new portal we are creating we have exposed the back end incident form via the 'forms' widget so users can submit new incidents. This has been amended slightly so when the user clicks the save button it redirects them back to the portal homepage.
What I would like though is for an info message to display once the user has been redirected to the homepage. The info message would confirm the record has been submitted including the number for that ticket.
Not sure how to achieve this?
Any suggestions are greatly appreciated
Thanks
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 06:14 AM
If you are using the self service version of the Incident form, go to Maintain Items, locate the 'Create an Incident' form and add the following to the Script section
gs.addInfoMessage("Incident " + inc.number + " created");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 06:27 AM
Hi Sam,
You may customize following piece of code as per your requirement. Here you are. I believe you get an idea in order to achieve your requirement. Below in the Server Script and Client Script for the sc_cat_item widget.
Please mark post as corrected and helpful based on the response.
--
Nikhil Dixit
Engineer
Board Line +91-20-6728-5000 | Direct +91-20-6728-5000 | Mobile +91-7828220937
| www.DxSherpa.com | Skype : nnikkhil2709dixit |- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2018 07:27 AM
Hi Nikhil,
I'm new to coding so not really sure how I need to amend my clone of the 'form' widget in order to get this to work.
currently in the client controller I have the following that does the redirect:
Before I put this redirect in place it seemed to use the following line in the Server script to show the message ' Record Added':
and this is in the client script:
since redirecting to the homepage this message does not display?
Thanks
Sam