Hi Everyone,
I am having some issues creating a Deposit in my Scheduled Script. I have read the following documentation:
. I have tried to follow the same process in the example provided.
- I have tried creating this in dynamic and standard mode.
- In the script I made sure I hard code values for required fields.
- Verified in the UI I am able to create and select the payment I am using.
The NRecord.Create() method is called and allows me to set values. It isn't until you try to setSublistValue() does it throw the error. Per the documentation it says I should just be able to set the Id and Deposit field. I have done that then I have tried to go beyond this and set other fields. However it still results with the same error:
"name": "UNEXPECTED_ERROR", "message": "An unexpected SuiteScript error has occurred",
I can see the Deposit Record is created before the setSublistValue() is called.
- I have tried gathering the line count it using getLineCount() returns 0
- using findSublistLineWithValue() with the payment id returns -1
I am at a loss on where to go next. If anyone can help it would be much appreciated.
Thank You,
Andrew