This Saved Search gives me duplicates, even when M...
# general
e
This Saved Search gives me duplicates, even when Main Line = T... Any idea why?
Copy code
var journalentrySearchObj = search.create({
   type: "journalentry",
   filters:
   [
      ["type","anyof","Journal"], 
      "AND", 
      ["mainline","is","T"]
   ],
   columns:
   [
      search.createColumn({name: "tranid", label: "Document Number"}),
      search.createColumn({name: "memomain", label: "Memo (Main)"}),
      search.createColumn({name: "trandate", label: "Date"})
   ]
});
n
Please try to add specific GL account in criteria.
r
Unlike with most (all?) other transactions, every line of a journal is considered "main line." if you're just wanting to get a single line per JE, usually adding in Line ID=0 works.
Though I think if you're pulling dollar amounts, that will still be the first line of the JE in the UI if I remember correctly, so you'd probably have to summarize.
e
Oh, interesting about being considered Main
Thanks @Nawarain @RJMNS
👍 1
n
@Edgar Valdés You are Welcome.
j
The reason journals doesn't apply for main line is because there is no account on the "head" of the transaction as it is for other transactions
e
Makes sense @Jesper M Thanks!