What's the best way to get the date that a cash sa...
# suitescript
n
What's the best way to get the date that a cash sale was deposited
d
not sure it's the best, but a system notes search would tell you
n
I was hoping I could determine this from the cash sale itself
d
something like this? Don't think you can do it without a search (or SQL query)
Copy code
var cashsaleSearchObj = search.create({
   type: "cashsale",
   filters:
   [
      ["type","anyof","CashSale"], 
      "AND", 
      ["systemnotes.field","anyof","TRANDOC.KSTATUS"], 
      "AND", 
      ["systemnotes.newvalue","is","Deposited"]
   ],
   columns:
   [
      search.createColumn({
         name: "date",
         join: "systemNotes"
      })
   ]
});