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
Andy Freeston_LarterAndy Freeston_Larter 

LMA license org type

Salesforce is now listing Sandbox installs in the LMA licenses page. There does not seem to be a standard way of identifying if the install is on a sandbox or production org and this was causing confusion for our sales team.

As a temporary workaround we are using a formula field on the license object and this returns 'Sandbox', 'Production', or 'Unknown' based on the org id. You can use of this formula until Salesforce release a better method. (If you find missing orgs, please post an update)

IF(
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'J' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'K' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'L' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'M' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'N' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'O' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'P' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'Q' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'R' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'S' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'T' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'V' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'W' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'Z' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'c' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'e' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'f' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'g' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'm' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'n' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'q' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '1', 'Sandbox',

IF (
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'A' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'B' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'C' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'D' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'E' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'F' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'G' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'U' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'a' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'b' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'd' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'i' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = 'o' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '0' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '2' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '3' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '4' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '5' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '6' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '7' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '8' ||
MID( sfLma__Subscriber_Org_ID__c, 4, 1) = '9' , 'Production', 'Unknown' ) )
kiranmutturukiranmutturu
check this may be helpful to you,,,User-added image