Cannot update Name-Value Pairs Column in a Table

timwu
Tera Contributor

 

I'm trying to update a column in a table that is typed Name-Value Pairs, within Scripted REST API, however, I was not able to update the column, the other "id" column typed String is updating fine.

 

Is there something that I have done wrong?

 

    var dataObj = {
        name: 'test',
        email: 'test@example.com'
    };
 
    var grNew = new GlideRecord('my_table');
    grNew.initialize();
    grNew.setValue('id', 'abcde');
    grNew.setValue('data', JSON.stringify(dataObj));
    var newSysId = grNew.insert();

 

0 REPLIES 0