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
Kavitha Levaku 4Kavitha Levaku 4 

NA4 instance refresh- Flows and Email-to-case


We have received a heads up from Salesforce team that NA4 instance is going under refresh and whereever we have hardcoded references, we need to update them to make our org ready for the refresh.

I found that NA4 is being referrred in -
1) Flows- Purpose of the flow is to verify if a Contact already exists during creation and display an error message on the screen along with detail link of the contact. How should I take care of na4 references in the detail link to be updated?
2) Under Email-to-Case for one of the Email2Case Support group have Email Services Address references NA4.  does this requires any change? I believe as the routing email address already verified no action required. Kindly Clarify.

Please help me to sort this out.

Thank you.
NagendraNagendra (Salesforce Developers) 
Hi Kavitha,

Follow the steps below to update hard-coded references* in your org and your org's metadata (setup or customer code):
i. Create a new Project:
1. Go to File > New > Project
2. Provide a name for your project, enter your login credentials for the org, then click "Next.”
ii. Choose the project contents:
1. Select metadata components, then click "Choose."
2. On the next screen for metadata components, select the fields required then click "OK."
a. At a minimum, we suggest selecting the following: email templates, home page components, web links, workflow, triggers, classes, visualforce pages, and tabs.
3. Please keep in mind that you can only pull 1500 components at a time. If you need to pull more metadata, we recommend dividing your work into multiple projects.
a. If you exceed the limit for number of components, you will receive this error message: "LIMIT_EXCEEDED: Too many files retried in a single retrieve call, limit is 1500." The Metadata API, which the IDE uses to communicate with the server, enforces these limits per each deploy/retrieve transaction.
iii. Once you have created your project, press Ctrl-H to perform a search.
1. Search for the name of the instance that your org resides on, for example: NA4. See Figure 1 below.
a. If you have multiple projects open, right-click on each project you don't want to search on and choose "Close Project" or modify the search criteria so that you have a "working set" to minimize the files you're searching on.
b. If you need to access the server instance in your Visualforce page, you can use the following JavaScript function getServerInstance() to parse out the server instance from the URL:
            function getServerInstance()
                    var URL = window.location + “”;
                    var urlParseArray = url.split(“.”);
                    var i;
                    for(i=0; i< urlParseArray.length; i++)
                    if(urlParseArray[i].indexOf(“salesforce”) != -1)
                        return urlParseArray[i-1];
                        if(urlParseArray[i].indexOf(“force”) != -1)
                        return urlParseArray[i-2]
                    return null;
* These steps will remove hard-coded references from Visualforce Pages, home page components, web links, workflow, triggers, classes, and tabs. These steps will NOT remove hard-coded references from image URLs within email templates or Knowledge articles

Kavitha Levaku 4Kavitha Levaku 4
Thanks Nagendra for sending the steps.
Instead of using IDE I would like to explore how this is doable manually for Flows. Any thoughts would appreciate.
and also coming to email-to-case question, there were no data records resulted when processed through IDE search engine. However when manually logged into the SFDC application found the email service address as userfirstname.lastname@************************* Does this requires change? I believe not as this was salesforce generated email service address prior user verifies the email address that was entered during the setup process. Kindly clarify.

Thank you.
I have the same question as Kavitha regarding Email Services.  I have an org on na23, which while soon go through a refresh and end up on na53.  I currently have a few custom email services within that org, both of which have email addresses with domains that end in "".  The domains for these email addresses are system generated - I can't change them.

When na23 gets refreshed and becomes na53, will the SFDC platform route emails sent to those same email addresses to my org where it resides on the new hardware?  Or do I need to coordinate with every 3rd party using those email addresses and have them switch to a new email address after the refresh - and if so, can I find out what the new email address will be ahead of time?
Kourt NeyraKourt Neyra
Were you able to find a solution for your question? We are going to be in the same situation in a few days.

Kavitha Levaku 9Kavitha Levaku 9
Hi Chad and Kourt,

Please go through the below mentioned link for Email-to-Case query-  (FAQ 11)

and coming to flows - first locate the flow which require changes in supportive to this change using IDE, then login to salesfroce and go to that flow , deactivate the latest active version of the flow(Since without this step system will not allow to make the changes) , open that deactivated version , make the changes updating the hard code references with domain name , saveas New Version and finally activate the new version of the flow. Recommendation is to first make all the suggested steps in sandbox prior deploying them in Production instance.

Thank you.