Ui action in knowledge article

Vinya Jakkula
Tera Contributor

Hi Team, 

Can anyone help me

I have created custom ui action on knowledge table. But is getting knowledge record not found.iam trying to redirect to workspace.

  • function CopyKnowWorkspace() {
        var number = g_form.getValue('number');
        var instance = "https://" + parent.location.hostname; // Get the instance hostname
        var knowLink = instance + "/now/sow/kb_view/kb_knowledge/" + number; // Construct the URL

        if (number) {
            // Copy the link to clipboard
            copyToClipboard(knowLink);
            alert("Copied to clipboard: " + knowLink);
        } else {
            alert("Knowledge article number is not available. Unable to generate link.");
        }
    }
5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Vinya Jakkula 

the url requires sysId and not number

get the sysId and replace in the knowLink

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Thanks @Ankur Bawiskar .

One more question can you guide me please where 'copy link' is configured in knowledge article in workspace.

@Vinya Jakkula 

it's present here -> sys_ux_lib_source_script table

check this link

Change the Copy Link action in Knowledge articles when viewed from Agent WorkSpace 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar  I have already seen this article.but when I have modified to workspace url but it is not changed.please help on this.