Posts

Showing posts from September, 2025

SuiteScript : Track Original Transaction (the Copied From)

Image
Script Difficulty: 💚 💚 💚 Ok, so have you ever wonder if a transaction is copied or created from scratch?  And if it is copied from another transaction, well, where did it come from originally? In this exercise we have a client script that tracks your records as the users process the transaction in such a behavior.  The user start out by opening an existing record then clicking "Make Copy". The script kick off a series of validation checks and grabs its original transaction and dump it in a customer field (Type record).  The administrator (or power user) can later run a report base on this field for audits. If the transaction is not copied (meaning it is created from scratch) then the custom field will left blank.  In essence, if you see a non-blanks in this tracking custom field, you know it is a copy. The solution does a one pass check (it will only check as far back as one copied at a time).  If  the record has already make multiple copied passes, you ...