I think I may have figured out a way. I have a se...
# suitescript
s
I think I may have figured out a way. I have a search script that let's me basically query NetSuite's db, so I think I can, based on a flag, loop through and get the content and return it
t
hey @screnshaw, I'm exactly looking for that to solve my problem. Could you share me your script please? It would be wonderful 🙂
s
It's basically something like this.
Copy code
if (getFile && !getFileContents)
            {
                var transactionFile = render.transaction({
                    entityId: Number(result.id),
                    printMode: render.PrintMode.PDF
                });
                obj["file"] = transactionFile.getContents();
            }
            else if (getFileContents)
            {
                try
                {
                    var remainingUsage = runtime.getCurrentScript().getRemainingUsage();
                    if (remainingUsage >= 30)
                    {
                        obj["file"] = file.load(result.id).getContents();
                    }
                }
                catch (e)
                {

                }
            }
👍 1
And that is in a loop
t
thanks