1

I have to run a scheduled batch class in a sandbox to update records in production. Please let me know if that is possible some way.

I can't create the batch class in production due to some business restrictions.

  • yes, if your batch job do some callouts to production, which update data – kurunve Aug 4 '17 at 7:35
  • Can you please show me an example of such a case? – Testing_SFDC Aug 4 '17 at 8:05
  • What happens if someone accidentally refreshes the sandbox? – David Cheng Aug 16 '17 at 5:55
1

Well that certainly is a complicated situation but sticking to your question, I think your best bet would be to make the batch use the SF API, just as @kurunve said.

Make the batch with the logic you need and then, wherever you're supposed to do a Database.update(myrecords), then make a callout to Production enviroment.

Here you can find extense documentation for the REST API.

Here you can find a trailhead that guides you through the process of making such a callout.

Take into account that you will have to register the endpoint which you will callout to in Setup > Remote Site Settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.