Is the createdFrom on an invoice ALWAYS a Sales Or...
# suitescript
c
Is the createdFrom on an invoice ALWAYS a Sales Order record?
d
It could be nothing (standalone invoice), or an Estimate Not sure of what else
a
yeah i'm kind of wracking my brain trying to think what else it might possibly be
🤔 1
honestly didn't even realize you could directly create invoices from estimates
d
does a memorized invoice count as being created from the memorized transaction?
c
So far, if it's not empty, then I can only think of SO and Est.
👍 1
s
can intercompany transactions play a role there?
a
perhaps - intercompany SO?
i don't know that feature well enough to say
s
or, can transfer orders be invoiced?
d
no, TOs are only TO > IR > IF
s
ok, wasn't sure if intercompany TOs had invoices in the mix somewhere
d
ugh, intercompany TOs.... good point
easy answer, script the logic for standalone, sales order and estimate, and
N/email
yourself if there's a transaction type you haven't accounted for 😆
w
it uses governance points though, but if you are scripting something on the invoice and want to be really sure that you only process Invoices created from Sales Order you can use a search.lookupFields search.lookupFields({type: search.Type.TRANSACTION, id: createdFromId, columns: ‘recordtype’}); This will give you the recordType of the created from transaction (if populated).
👍🏻 1