Creating INC ticket by using the scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
We have implemented the logic to create an INC ticket based on the scheduled job execution. However, for the INC ticket Description field, we need to populate a catalog URL in a user-friendly format.
Currently, the complete catalog URL is displayed in the Description. Instead, we would like to display a clickable text such as “Service Account Password Reset”. When the user clicks on this text, it should open the corresponding catalog item in a new browser window/tab.
Advance thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @RC10 ,
Yes, this can be done. Since Incident Description supports HTML, instead of putting the full URL directly, create an anchor tag with the text you want to display.
For example, you can change your Description assignment to:
inc.description = "The password for Service Account " + svcAcct.name +
" is set to expire on " + svcAcct.u_password_exception_granted.getDisplayValue() +
".<br><br>" +
"Please submit a <a href='" + instanceUrl + "sp?id=sc_cat_item&sys_id=" + resetCatalogItem + "' target='_blank'>Service Account Password Reset</a>.<br><br>" +
"If you are no longer using this account please disable your account here.<br><br>" +
"If you believe you received this service account password expiration in error please click here.";
This will display "Service Account Password Reset" as clickable text instead of showing the complete URL.
The target="_blank" will open the catalog item in a new browser tab/window.
One thing to verify is whether the Description field is rendering HTML in the UI where the incident is being viewed. If the HTML is displayed as plain text, then we need to check the specific Incident form/workspace configuration.
If this helps, please mark it as Helpful and accept the solution.
Regards,
Tejas
