+ Start a Discussion

Org id value getting refreshed after the environment refresh

We have refreshed our Sandbox1 environment with Sandbox2. On Sandbox2, we had a formula field for the image defined as :

Once this formula field gets migrated to Sandbox1, the oid value changes to the Org Id of sandbox1.. As the image is there only on Sandbox2, it renders the changed URL invalid and the image is not getting displayed.
Is there a way to avoid the org id value getting changed during refresh.
Are there any other better solutions to displaying the image rather than hardcoding the Image id and Org id in the above formula field.



Instead of passing the hard code value of orgid you can use the $Organization.Id in your formula field.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 



Thanks for your response.. This however doesnt answer the question I was looking for.


We dont want the Org id value to change in our case.. So, using the merge field would not help because it will change the value from env to env..


Just to give more context of the problem:

We want to upload the images only on one enviroment and be able to use those on other environments using the URL directly.. If the Org id value keeps changing based on the environment, we would not really be able to fetch the image.


You can create a label "orgID" to insert your Org ID and use it on your Formula / Validation Rule.

After each refresh you have just to change this value !


Have a good day !