How to find Sanbox name? June 5, 2015June 9, 2022InfallibleTechie Admin UserInfo.getUserName().substringAfterLast(‘.’) will give you sandbox name. The username will always ends with .Sandbox_Name in sandbox. Cheers!!!