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
LuckkyLuckky 

getting Related SandBox id s in Productoion organization

Hi ,

 

I need to know

 

 By using Query or Api can we retrieve all the related Sandbox ids in Production environment ?

 

please tell me this is possible or not?

 

if possible please tell me how?

 

 

 

 

LakshmanLakshman

Hi Lucky,

 

Write the following piece of code in a class and then compare with production Id. Production id is always constant, this will help you to determine whether your are in Prod or sandbox

public static Boolean IsProduction() {
return ( UserInfo.getOrganizationId() == 'XXXX' );
}

(Just replace the XXXX with your Production Organization Id.)



Regards,

Lakshman

LuckkyLuckky

Thanks for your Reply Lakshman

 

But here I need getting the SandBox ids in Production environment by SoqL Query or API 

 

we cant create  classes in Production . but we can do some thing by using System log .

 

Please answer my Question

 

 

thanks 

 

 

 

LakshmanLakshman

I think the following link gives answer to your question. It has an idea to do it with a special table record.

 

http://techblog.appirio.com/2009/01/organization-specific-variables.html

 

Regards,

Lakshman

Ankit AroraAnkit Arora

This looks strange to me. Can you please tell me why you want to fetch the Sandbox Ids in Production?

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

Yifei Xu 8Yifei Xu 8
I have the same isuue.@Luckky, do you have a solution?