My script include only returns true of false based on if it is a Self Service KB article or not. How would I get it to return both. Also the script appears to be updating the comments as I can see it display the updated URL but it is almost like the comment is being committed a spit second before the update the comment. See screenshot below with the correct URL in the comments.
 

BrianLancaster_1-1738603247431.png

 

Below is my script include:

var CheckKnowledgeBase = Class.create();
CheckKnowledgeBase.prototype = Object.extendsObject(AbstractAjaxProcessor, {
    isSelfService: function() { //function to verify if a KA is in the Self-Service Knowledge Base
        var number = this.getParameter('sysparm_number');
        var gr = new GlideRecord('kb_knowledge');//Glide Record query to search for the KB Article
        gr.addQuery('number', number);
        gr.query();
        if (gr.next()) {
            if (gr.kb_knowledge_base.getDisplayValue() == "Self-Service") {//Check if artical is part of the Knowledge base.
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    },
    type: 'CheckKnowledgeBase'
});