@hvrdhn88 

So there are absolutely no error when running this in the regular UI. Once I changed the trim code to var kbNumber = kbNumberSub.trim(); this section of code started working in SOW.  However the code for the function was doing anything. So I made another adjustment to the code in the GlideAjext response function. It now looks like this.

function isSelfServiceParse(response) { //Verify responce is true and set comments if correct.
    var answer = response.responseXML.documentElement.getAttribute("answer");
    if (answer == "true") {
        var comment = g_form.getValue('comments');
	var newComment = comment.replace("kb_view.do?sys_kb_id", "prism?id=kb_article&sys_id"); //this is the new code
        g_form.setValue("comments", newComment); //this has been setup to use the new variable.
    } else {
        var userGA = new GlideAjax('getUserData');
        userGA.addParam('sysparm_name', 'checkFulfiller');
        userGA.addParam('sysparm_user_sys', g_form.getValue('caller_id'));
        userGA.getXML(checkFulfillerParse);
    }
}

Now I can see the comments actually being updated (screenshot below) but for some reason it still posts the comments with the kb_view.do URL instead of the portal URL.

BrianLancaster_0-1738359780037.png