You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using your library to get the resources from a connector. The resource should have 1692 entries in it. I use your helper function getDataBatch to do it in batches. I'm using the REST API of AFAS. I get the following error;
Afas GetConnector returned a non-array value. (Has an unsupported Outputmode option been set?)
Which makes sense, because when debugging AFAS returns null. So for some reason it doesn't find any entities in the batch. I'm using the following code;
Thanks for the report. I've never used this together with the REST API and will depend on your feedback / testing to make this work better.
Questions that come to mind: (If you don't know, skip to the next question.)
I believe that $client->callAfas() should never return NULL; I expect it to return an empty array to represent "no data found". Do you have information that contradicts this?
Are you sure "Verkooprelatie" is a sortable field, that will work correctly if you apply a 'smaller / larger' filter to it?
Is there a timeout from AFAS maybe? If so, try adding a 'take' parameter to the arguments of getDataBatch(). (I believe my code does not add any explicit 'take' and assumes that REST will return maximum 100 records, but that behavior might be changed.)
Otherwise... can you dd($filters); dd($getdata_args); dd($context), in the Helper class just before this exception gets thrown?
PS I don't think filling $results or the 'options' argument should be necessary, but it shouldn't hurt either.
Hi RMUit,
I'm currently using your library to get the resources from a connector. The resource should have 1692 entries in it. I use your helper function getDataBatch to do it in batches. I'm using the REST API of AFAS. I get the following error;
Afas GetConnector returned a non-array value. (Has an unsupported Outputmode option been set?)
Which makes sense, because when debugging AFAS returns null. So for some reason it doesn't find any entities in the batch. I'm using the following code;
Can you help me how to implement this method?
The text was updated successfully, but these errors were encountered: