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
khaitanskkhaitansk 

Org id value getting refreshed after the environment refresh

 Hi,
We have refreshed our Sandbox1 environment with Sandbox2. On Sandbox2, we had a formula field for the image defined as :
https://c.na8.content.force.com/servlet/servlet.ImageServer?id=015C0000001ejlA&oid=XXXXXXXXXXXXx&lastMod=1323901344000

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.

Thanks.
Navatar_DbSupNavatar_DbSup

Hi,

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. 

 

khaitanskkhaitansk

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.

yogoyogo

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 !