Hi, I have a custom server-side workflow, which ru...
# general
i
Hi, I have a custom server-side workflow, which runs some suitescript when a CustomerPayment is created. Normally, it works fine, but if triggered by a CSV import of payments (in which I've selected the advanced option to trigger server-side workflows), it fails on this piece of the script:
Copy code
var file = render.transaction({
          entityId: currentRecord.id,
          printMode: render.PrintMode.PDF
        });
The script's execution log shows an error:
Copy code
{
  "type": "error.SuiteScriptError",
  "name": "UNEXPECTED_ERROR",
  "message": null,
  "stack": [
    "createError(N/error)",
    "runMyAction(/SuiteScripts/myscript.js:49)"
  ],
  "cause": {
    "type": "internal error",
    "code": "UNEXPECTED_ERROR",
    "details": null,
    "userEvent": null,
    "stackTrace": [
      "createError(N/error)",
      "runMyAction(/SuiteScripts/myscript.js:49)"
    ],
    "notifyOff": false
  },
  "id": "25ccd38c-7866-4d65-8f25-ef0b6bd7bde7-2d323032332e30332e3330",
  "notifyOff": false,
  "userFacing": false
}
How can I debug this further?