Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling nextRecordsUrl #221

Open
jbrown2018 opened this issue Aug 22, 2019 · 1 comment
Open

Handling nextRecordsUrl #221

jbrown2018 opened this issue Aug 22, 2019 · 1 comment
Labels

Comments

@jbrown2018
Copy link

jbrown2018 commented Aug 22, 2019

Love the interface you've provided for laravel. One issue I've ran into though is that there is no way to handle the nextRecordsUrl returned from Salesforce in the case of a large result set being returned.

I had to modify the query function in client.php to the following

public function query($query, $options = [], $nextUrl = false)
{
        $url = $this->instanceURLRepo->get();
        $url .= $this->resourceRepo->get('query');
        if ($nextUrl == true) {
            $url .= '/';
        }
        if ($nextUrl == false) {
            $url .= '?q=';
        }
        $url .= urlencode($query);

        $queryResults = $this->request($url, $options);

        return $queryResults;
}

This will allow users to pass in the nextRecordsUrl returned by salesforce to get the next set of records.

@omniphx
Copy link
Owner

omniphx commented Nov 23, 2019

Something like that could be built, but I feel that would make this library a little too opinionated.

For instance, there might be situations where an application would like to handle returning the next set of records a certain way.

I'll leave the issue open in case others have input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants