NetSuite GetValue does not work for join column

Viewed 2519

I am trying to get a column value for the join table through SuiteScript. It does not throw error but it dont show the result either. Any tweak or tips to get the value.

var vendorSearchObj = search.create({
    type: "vendor",
    filters: [
       [["entityid" , "is" , "KMSS"]]
    ],
    columns: [
       search.createColumn({
          name: "entityid",
          sort: search.Sort.ASC
       }),
       "altemail",
       search.createColumn({
          name: "salutation",
          join: "contact"
       })
    ]
 });
 var searchResultCount = vendorSearchObj.runPaged().count;
 vendorSearchObj.run().each(function(result){
    // .run().each has a limit of 4,000 results
     log.debug("result", result);
     for (i = 0; i < 3 ; i++) {
        log.debug(result.columns[i].name,result.getValue({name : result.columns[i].name}));
    } 
    return true;
 });

All the value is coming except the salutation column. But in result set the value is available. Below is the resultset value.

{
   recordType: "vendor",
   id: "375",
   values: {
      entityid: "KMBS",
      altemail: "",
      "contact.salutation": "Konica Jag"
   }
}

TIA...

1 Answers
Related