Which two statements are true regarding the cc_CallContext class in Salesforce B2B Commerce? (2 answers)

Which two statements are true regarding the cc_CallContext class in Salesforce B2B Commerce? (2 answers)
A . The Salesforce session is accessible via the getSession method
B . The class can be used internally within Salesforce B2B Commerce and in subscriber code to access context level parameters
C . The userLocale variable returns the current Locale for storefront.
D . The current storefront is accessible via thisclass

Answer: B,D

Explanation:

The cc_CallContext class is a utility class that provides access to various context level parameters, such as the current storefront, user, cart, price list, currency, locale, and session. The class can be used internally within Salesforce B2B Commerce and in subscriber code to access these parameters. The current storefront is accessible via this class by using the getStorefront method, which returns a cc_Storefront__c object. The userLocale variable returns the current Locale for storefront, but it is not part of the cc_CallContext class. It is a global variable that can be accessed from any Visualforce page or component by using {!userLocale}. The Salesforce session is accessible via the getSession method, but it is not part of the cc_CallContext class either. It is a method of the cc_SessionUtil class, which is another utility class that provides methods for managing sessions.

Salesforce Reference: [B2B Commerce Developer Guide: cc_CallContext Class], [B2B Commerce Developer Guide: cc_SessionUtil Class]

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments