VA conversational catalog items
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Team,
I need to make one of record producer to conversational item and i have made it.
There is one error that we must not use DOM objects in client script to make conversational.
This is the client script we use.
function onSubmit() {
//Type appropriate comment here, and begin script below
if((g_form.getValue('does_the_proposed_delegate_report_to_the_manager') == 'No') && this.document.getElementsByClassName('get-attachment').length == 0) {
g_form.addErrorMessage(getMessage('You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'));
return false;
}
}
How we can modify so it supports VA.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
g_form.hasAttachments() doesn't work on portal, the script is wrongly shared
see if this works for you and you are able to use VA Conversational for this item
function onSubmit() {
//Type appropriate comment here, and begin script below
if ((g_form.getValue('does_the_proposed_delegate_report_to_the_manager') == 'No') && getRPAttachmentCount() == 0) {
g_form.addErrorMessage(getMessage('You must attach a confirmation message from your proposed delegates manager with this ticket before proceeding.'));
return false;
}
}
function getRPAttachmentCount() {
var length;
try {
length = angular.element("#sc_cat_item_producer").scope().attachments.length;
} catch (e) {
length = -1;
}
return length;
}
If not then you can't use this ITEM for Conversational VA
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
