on 05-05-2020 10:37 PM
Using Postman to set odata.maxpagesize the following works if I manually add the "Prefer" header before making the call.
GET /Invoices
Prefer:odata.maxpagesize=8
The preference shows as applied in the response header and the data includes the nextlink.
"odata.nextLink": "/b1s/v1/Invoices?$skip=8"
But I cannot get it to work in javascript/ajax
$.ajax({
type: "GET",
url: surl,
data: qParams.data,
datatype: "json",
contentType: "application/json",
Prefer: "odata.maxpagesize=8"
What is the correct syntax for adding the "Prefer" header in ajax? I have tried many possibilities so if anyone has a working example of how to code this it would be a big help.
Thanks,
Mel
Mel,
Please see the SAP Business One ... Working with the SAP Business One Service Layer.
Section 3.7.6Paginate the Selected Orders
Hope that helps,
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
9 | |
7 | |
6 | |
6 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.