Tuesday, June 27, 2017

Sand Box And Production in salesforce:

What is a sandbox org?

A sandbox is a copy of the production environment/ org, used for testing and development purposes. It’s useful because it allows development on Apex programming without disturbing the production environment.
When can you use it?You can use it when you want to test a newly developed Force.com application or Visualforce page. You can develop and test it in the Sandbox org instead of doing it directly in production.
This way, you can develop the application without any hassle and then migrate the metadata and data (if applicable) to the production environment. Doing this in a non-production environment allows developers to freely test and experiment applications end to end.

Interview questions on Sandbox environment in salesforce

1.What is refreshing of sandbox and how to do it?
In order to update the sandbox with the data in production.
Refresh is done and refreshing a sandbox delete s the previous copy and updates sandbox with copy of production.

To refresh a sandbox logon to salesforce.com
With production id and password
Go to setup>company name>administrative tools>data management >sandbox
Click refresh link next to sandbox

Note: make sure u have a copy of it before u refresh sandbox

2.What is sandbox?
To make any changes for the exiting application we should copy all contents of the production into sandbox and make all changes after that test thoroughly after that move those changes into production.
To create the sandbox, in production we can find one link called sandboxes. by clicking on that link we can create the sandbox by choosing type of the sandbox.

3.What is sandbox url?
test.salesforce.com

4. What are the types of Sandboxes?
Types of Sandboxes are:
  • Developer
  • Developer Pro
  • Partial Copy
  • Full

5)Can you edit an apex trigger/ apex class in production environment? Can you edit a Visualforce page in production environment?

No, it is not possible to edit apex classes and triggers directly in production environment.
It needs to be done first in Developer edition or testing org or in Sandbox org. Then, to deploy it in production, a user with Author Apex permission must deploy the triggers and classes using deployment tools.
However, Visualforce pages can be created and edited in both sandbox and in production.
Only if the page has to do something unique (different values), it would have to be developed via Sandbox.

Salesforce "Email Privileges Revoked" error message

When you write apex code in Salesforce to send email in Sandbox instance, you may find error "Email Privileges Revoked" error message.





You may never see this error earlier. What is the caused?

As per Spring'13, Salesforce have added a way for you to control the type of email your organization sends, with the new Access level setting in Setup Administration Setup > Email Administration > Deliverability. 











While you typically won’t change this setting day-to-day, these options can be useful when you need to temporarily suspend outbound email or when you’re working with sandboxes, for example:

  • No access: Prevents all outbound email to and from users.
  • System email only: Allows only automatically generated emails, such as new user and password reset emails.
  • All email: Allows all types of outbound email. Default for new, non-sandbox organizations.
Tip: The System email only setting is especially useful for controlling email sent from sandboxes so that testing and development work doesn’t send test emails to your users.
  • Newly created sandboxes default to System email only.
  • Sandboxes created before ’Spring 13 default to All email.

You may not be able to edit the Access level if salesforce.com has restricted your organization’s ability to change this setting.

Summary: by change access level to "All email", it should solve the issue in Sandbox.


Salesforce Sandbox Refresh


Salesforce Sandbox Refresh  & How to refresh salesforce sandbox


Available in: EnterpriseUnlimited, and Database.com Editions only

Permission to view sandbox: “View Setup and Configuration
Permission to create, refresh, activate, and delete sandbox: “Modify All Data

From Spring '13 release, newly created sandboxes have the default email deliverability setting System email only. The System email only setting is especially useful for controlling email sent from sandboxes so that testing and development work doesn't send test emails to your users.

From Summer '13 release, you can create sandbox Template to choose data included only for Full sandbox.

You can refresh Full Sandbox every 29 days.
You can refresh Developer Configuration Only Sandbox once a day.

Sandbox Status:
  • Copying, the initial creation stage. When you create (or refresh) a sandbox, Salesforce copies the configuration and data you specify to the sandbox. A sandbox in the “Copying” stage is not yet ready for use. Copy time depends on the size of the data, and can take several hours.
  • Ready for use, Salesforce finished copying data to the sandbox, and you can log into the sandbox or run application tests on the sandbox.
  • Replacement Ready, this status indicates Salesforce has a copy of your object data and is ready for you to activate the sandbox so you can use it.
  • In use, sandbox already activated and in use.

Login to Salesforce sandbox, from https://test.salesforce.com by appending .sandbox_name to their Salesforce usernames. For example, if a username for a production organization is user1@acme.com, and the sandbox is named “test”, then the modified username to log into the sandbox is user1@acme.com.test.

Once refresh, sandbox organization ID will be changed and may appear in different instance, e.g. cs6, cs3, cs12, etc.

Refresh link will be visible in a sandbox when it is eligible for refreshing.

Activate link to activate a refreshed sandbox. Activating a refreshed sandbox replaces the existing sandbox with the refreshed version. This permanently deletes the existing version and all data in it.

Few important date and time related to sandbox refresh
Requested: date and time when admin click Refresh link
Finished : date and time when Salesforce finish copying data to new sandbox
Activated: date and time when admin click Activate link, old sandbox will be delete
Copied On: date and time when Salesforce provision newly refresh sandbox and ready to use

No comments:

Post a Comment