function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Harish Sridhar 10Harish Sridhar 10 

hello, I have a requirement where I have an endpoint URL to access and get some details using custom setting.

So here the cursor & limit here I have hardcoded and is now working fine.
So my real requirement is here limit is always a constant and the cursor value increases based on the limit.

Lets take now for the first time the URL is,
https://xyz/abcHistory?apiKey=SupportApiKeyQA&wrap=true&ref=TechSupportDiagTool&cursor=1000&limit=10
the next time my cursor value must alone increase by 10. and the endpoint must be.
https://xyz/abcHistory?apiKey=SupportApiKeyQA&wrap=true&ref=TechSupportDiagTool&cursor=1010&limit=10
Here I know we need to use custom setting, can somebody please help me?
i.e. the cursor value in the custom setting alone must increase by limit value.
 
Prasad Avala(SFDC-SF)Prasad Avala(SFDC-SF)
Harish,
How are you calling the enpoint.

We use to have a similar requirement and calling the endpoint from a batch class.

We have used for Loop under execute method and step size as 10 and problem solved. Hope it helps.