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
HafaelDiasHafaelDias 

How can I identify if an Org is on Trial.

Hi,

 

Is there a method that I can use to identify if an Org is on Trial?

 

I want to create a condition where I can limit some function of an apex class if it is on trial.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox
You can tell if the organization is in a salesforce.com trial by querying Organization for the TrialExpirationDate field. However, there's no way to determine if a managed package is in trial mode via Apex Code.

All Answers

sfdcfoxsfdcfox
You can tell if the organization is in a salesforce.com trial by querying Organization for the TrialExpirationDate field. However, there's no way to determine if a managed package is in trial mode via Apex Code.
This was selected as the best answer
HafaelDiasHafaelDias

 

I can use this field for what I want to do!

 

Thanks for the answer!!