I’m using the REST API to create customer payments...
# suitetalkapi
j
I’m using the REST API to create customer payments (either through creating a new record or !transform), and it’s not working properly for invoices on the last page of the payment sublist and beyond: here’s my call:
Copy code
{
  "externalId": "PYMT-test",
  "apply": {
    "items": [
      {
        "amount": 0.01,
        "apply": true,
        "doc": {
          "id": "98438"
        }
      }
    ]
  }
}
^ this works. if i change id to 98439, which is the first result on page 9901-10000, it gives me the following error
Copy code
Error while accessing a resource. You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.
has anyone encountered similar issues for customers with many invoices? Maybe in a restlet or soap context as well?
b
probably best to submit a support case to netsuite to ask
if you were using suitescript, I would tell you to use the invoices default value to specify the internal ids of invoices you want to appear on the apply sublist
do that while you transform a customer into the customer payment