Form Button not showing up in Service Portal

cnharris1
Kilo Sage

Good morning everyone,

I have a print button that I created on form in ServiceNow. The button works fine within the platform but when I view the form within the Service Portal, the button is missing. Its an client-side button, which I'm sure is part of my problem. I've tried using the gsftSubmit(null, g_form.getFormElement(),'print') but haven't had any luck. Could someone check out my code and tell me what I'm doing wrong? Here's my code along with a screenshot of the ui action:

gsftSubmit(null, g_form.getFormElement(),'print');

if (typeof window == 'undefined')
     popOutLink();

function popOutLink() {    
    var user = g_form.getReference('u_name');
    var signature= new GlideRecord('u_signature');
    signature.addQuery('u_document_id', user.sys_id);
    signature.orderByDesc('sys_created_on');
    signature.query();
    if(signature.next())
    {
        
    }
    window.open('wow_document.do?sysparm_signature=' + signature.sys_id+"&sysparm_wow_doc="+g_form.getUniqueValue()+"&sysparm_name="+user.name);
    
}

find_real_file.png

Any help will be greatly appreciated!

 

Best regards,

 

 

cnharris

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Harris,

Did you check the condition is matching for the record for which the button is missing? Because the button visibility is based on condition.

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Yes sir, I checked the condition and its visible and working on the form within the platform but disappears when I view the form on the Service Portal.

Hi Harris,

on which table this button is being created? is this custom table or catalog item table?

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Its on a custom table we built a few years back.

Best regards,

 

cnharris