Worknotes and Additional comments for ebonding doubling the first input.

Community Alums
Not applicable

Hello Experts,

I've facing problem on my ebonding integration getting the worknotes and additional comments if you first input the worknotes it will show then if you input the additional comments it will show in activity stream but it will show also the first text you input first in worknotes. Every input on additional comments it appear the last input work notes

Please find the attach image for reference.

I copied the OOB Payloader and add the worknotes and additional comments

var NN_PayloadBuilder = Class.create();
NN_PayloadBuilder.prototype = {
    initialize: function() {
    },
    createIncidentPayload:function(incident_sys_id){
        var incidentSysId = incident_sys_id;
        var incidentRec = new GlideRecord('incident');
        incidentRec.get(incidentSysId);
        //gs.info('Comments Changes: ' + incidentRec.comments.changes() );
        var incidentValues = {
            correlation_id: incidentRec.getDisplayValue('number'),
            short_description: incidentRec.getDisplayValue('short_description'),
            description: incidentRec.getDisplayValue('description'),
            state: incidentRec.getDisplayValue('state'),
            caller_id: incidentRec.getDisplayValue('caller_id'),
            business_service: incidentRec.getDisplayValue('business_service'),
            category: incidentRec.getDisplayValue('category'),
            impact: incidentRec.getDisplayValue('impact'),
            urgency: incidentRec.getDisplayValue('urgency'),
            cmdb_ci: incidentRec.getDisplayValue('cmdb_ci'),
            assignment_group: incidentRec.getDisplayValue('assignment_group'),
            assigned_to: incidentRec.getDisplayValue('assigned_to'),
            comments: incidentRec.comments.getJournalEntry(1),
            work_notes: incidentRec.work_notes.getJournalEntry(1)
        };
        var contactType = incidentRec.getDisplayValue('contact_type');
        if(contactType)
        {
           incidentValues.contact_type =contactType;         
        }
        
        var subcategory = incidentRec.getDisplayValue('subcategory');
        if(subcategory)
        {
           incidentValues.subcategory =subcategory;         
        }
        return incidentValues;
    },
    
    type: 'NN_PayloadBuilder'
};
1 REPLY 1

nandika 1
Tera Contributor

Hi @Community Alums 

I am facing the same issue .can you please let me know the solution to this issue.