Sandbox Variables

Hi,

We installed an on-premises version of Epicor 2026.1, and we are trying to use the sandbox environment variables mentioned in:

Whats New_Kinetic_2026.100 (2).pdf (539.0 KB)

But all we get is :

Has anyone encountered the same issue, or has anyone been able to get this working like in the pdf?

cast it to ISandbox and the auto complete will behave.

Wasn’t some code updated to sandbox on an upgrade. I’ll have to check my notes but think we had a few functions were touched by this.

The auto complete works now but how do you actually use it? If I throw an exception with that in my environment, I don’t have any value. Do I have to setup it somewhere?

((IEnvironment)((ISandbox)this.Sandbox).Environment).ApplicationEnvironmentName

Also, what are the values that I can use for ApplicationInstanceType? Since it’s not a string, I would expect a constant somewhere that I can compare it with (Pilot, Live, etc.) but I can’t find it either

((IEnvironment)((ISandbox)this.Sandbox).Environment).ApplicationInstanceType

Thanks !

ok I just unfortunately don’t have time to answer all that, but stop casting it repeatedly lol.

var sb = (ISandBox)Sandbox;

use sb lol