How to display the case number in portal widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 10:30 PM - edited 02-14-2024 10:54 PM
Hi Team,
I have created one widget which i'm mapping to standard ticket tab config.
in that widget, i need to display the "current case number"in html link.
like <p><a href="https://xyz.com(guid='',reference_number='<case_number>')" target="_blank">Process Link</a></p>
How can i display?
Please help!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 11:58 PM
You can try something like this
<div id="widgetBody">
<!-- Widget body content -->
<script>
var currentCaseNumber = "12345"; // Replace with your actual case number
// Construct the link using the current case number
var link = "https://xyz.com?guid=''&reference_number=" + currentCaseNumber;
// Create the HTML link
var htmlLink = '<p><a href="' + link + '" target="_blank">Process Link</a></p>';
// Insert the link into the widget body
var widgetBody = document.getElementById('widgetBody');
widgetBody.innerHTML += htmlLink;
</script>
</div>
Kindly mark helpful/accepted if it helps you.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 01:56 AM
Hi Maddy,
Since i'm using this widget in tab configuration.
the case number should be dynamic (not fixed/static)
Please help here!
Thanks!
Sri