Which two statements are true regarding the cc_CallContext class in Salesforce B2B Commerce? (2 answers)
Correct Answer: B,D
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 [B2B Commerce Developer Guide: cc_CallContext Class], [B2B Commerce Developer Guide: cc_SessionUtil Class]
Question 27
Which two guidelines should a developer consider when migrating aura components to LWC?
Correct Answer: A,D
When migrating aura components to LWC, a developer should consider two guidelines: migrate one component and then determine whether additional effort would make sense and start with simple components that only render UI. Migrating one component and then determining whether additional effort would make sense allows the developer to evaluate the benefits and costs of migration and decide whether to continue or stop. Migrating simple components that only render UI allows the developer to leverage the performance and modern features of LWC without much complexity or dependency on other components or services. Starting with migrating trees of components (components within components) is not a good guideline, as it can introduce more challenges and dependencies that can complicate the migration process. Forcing all developers to write any new components using Lightning web components is not a good guideline either, as it can create inconsistency and confusion among developers and users. Salesforce [Lightning Web Components Developer Guide: Migrate Aura Components to Lightning Web Components], [Lightning Web Components Developer Guide: Migration Considerations]
Question 28
What isthe difference between Gross Layout Overrides and Subscriber Templates?
Correct Answer: C
The difference between Gross Layout Overrides and Subscriber Templates is that Subscriber Templates allow for modification of the header and the footer, while Gross Layout Overrides allow for modification everything inside the header and footer. Subscriber Templates are custom Visualforce pages that can replace the standard header and footer components on a page. Gross Layout Overrides are custom Visualforce pages that can replace the default layout of a page, such as the number of columns, the position of widgets, or the content of sections. Salesforce B2B Commerce and D2C Commerce Developer Guide,Subscriber Templates,Gross Layout Overrides
Question 29
Which wire adapter should a developer use to retrieve metadata about a specific picklist?
Correct Answer: C
The developer should use the getPicklistValues wire adapter to retrieve metadata about a specific picklist. This wire adapter allows the developer to get the picklist values for a specified field on a given object and record type. The wire adapter returns an object that contains the picklist values, the default value, and the controlling field (if any). The developer can use this wire adapter to populate a custom picklist component with the appropriate values based on the object and record type context. The other options are incorrect because they are not valid wire adapters for retrieving picklist metadata.getPicklistValues,Retrieving Picklist Values Without Using Apex,B2B Commerce and D2C Commerce Developer Guide
Question 30
How do the REST APIs in Salesforce B2B Commerce support pass-through parameter handling
Correct Answer: B
The REST APIs in Salesforce B2B Commerce support pass-through parameter handling by passing parameters through the service handlers. This means that any parameters that are not recognized by the REST API framework will be passed to the service handler class that implements the API logic. The service handler class can then use these parameters for custom logic or validation.