We are doing monthly refreshes on sandboxes which is causing us to manually do certain things.

  1. Deactivate some users and add developer user for testing in sandbox.
  2. Change webservice connection details to point to dev environments.

How can we automate these tasks of creating users after refresh for developers in sandbox only and change connection strings on webservices? Do you guys have any apex class which does this now?

  • How do you have your connection details stored?
    – Mike Chale
    Commented Jan 31, 2014 at 15:11
  • 1
    In custom settings Commented Jan 31, 2014 at 16:59

2 Answers 2


Have a look at the following question which has a discussion about running an apex class from ANT. Simply write your apex class to set the custom setting values and create the users then run the ANT command as needed.

You could also use selenium as discussed here that could automate any standard UI button pressing.


force.com CLI could be used to script these kind of things. It's possible to both update data and run annonymous APEX.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .