How to find Sanbox name?

UserInfo.getUserName().substringAfterLast('.') will give you sandbox name.

The username will always ends with .Sandbox_Name in sandbox.

Cheers!!!

No comments:

Post a Comment