Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ExtensionInfo Class
Namespace
Example
1// The Sample Extension Provider registered with developer name as
2 // 'tax_extension_provider_for_us' will be selected for execution for en_US locale
3 if(CommerceExtension.ExtensionInfo.getLocaleString() == 'en_US') {
4 return new CommerceExtension.Resolution('tax_extension_provider_for_us');
5 }
6 // The Sample Extension Provider registered with developer name as
7 // 'tax_extension_provider_for_canada' will be selected for execution for en_CA locale
8 if(CommerceExtension.ExtensionInfo.getLocaleString() == 'en_CA') {
9 return new CommerceExtension.Resolution('tax_extension_provider_for_canada');
10 }
11 // The default Salesforce Internal Tax Api will return an empty response for German locale
12 if(CommerceExtension.ExtensionInfo.getLocaleString() == 'de') {
13 return new CommerceExtension.Resolution(CommerceExtension.ResolutionStates.OFF);
14 }ExtensionInfo Methods
The following are methods for ExtensionInfo.
getClientApiVersion()
Signature
public static Double getClientApiVersion()
getLocaleString()
Signature
public static String getLocaleString()
isCustomParametersAvailable()
Signature
public static Boolean isCustomParametersAvailable()
Return Value
Type: Boolean
Value indicating if custom parameters are available in the extension context (true) or not (false).