Hey folks. I have a question. Say I have a transac...
# suitescript
d
Hey folks. I have a question. Say I have a transaction record and I want to get all the file ids associated with that transaction, how would I do something like that in suitescript?
s
Something like this would prob work
Copy code
var transactionSearchObj = search.create({
   type: "transaction",
   filters:
   [
      ["file.created","onorbefore","today"], 
      "AND", 
      ["mainline","is","T"]
   ],
   columns:
   [
      "tranid",
      search.createColumn({
         name: "internalid",
         join: "file"
      })
   ]
});
d
Damn I really wish I was using 2.0
That looks so clean
@Sandii what would be 1.0 equivalent?
s
Copy code
var transactionSearch = nlapiSearchRecord("transaction",null,
[
   ["file.created","onorbefore","today"], 
   "AND", 
   ["mainline","is","T"]
], 
[
   new nlobjSearchColumn("tranid"), 
   new nlobjSearchColumn("internalid","file",null)
]
);
Something like that I assume, I dont use 1.0