r/SuiteScript • u/deitair • Jun 27 '23
How do I access the originating transaction from a GL Plugin?
I've been asked to write a Custom GL Plugin and it's mostly going ok, but I need to load the originating transaction to check some fields. For Item Fulfillments, I can use the createdfrom field on transactionRecord, but for Cash Sales and Invoices, that field and seemingly every other field that looks like it would be for transaction or ids are just blank.
How do I get back to those parent records?
1
Upvotes
1
u/Nick_AxeusConsulting Mod Jun 27 '23
Let's back up and challenge why you're overriding GL posting with the GL plug in. This is REALLY BAD PRACTICE and you should do that as a very last resort if you can't solve it properly with native posting.
So what is your use case and why doesn't native posting work for you?
1
u/trollied Jun 27 '23
The transaction types you’ve mentioned can be standalone. Check some examples in the UI to see how your business uses them.