Three statements that are true about Global API versioning are:
Calling in with an API version set to lower than 1 will result in an exceptional case where the exception class ccrz.BelowMinAPIVersionException will be returned to callers. This exception indicates that the API version is not supported by the framework and the caller should use a higher API version.
The APIversion is scoped at the Class API level and NOT at the method level. This means that all the methods in a class will use the same API version that is specified by the caller. For example, if the caller passes an API version of 4 to ccrz.ccServiceProduct.getProducts(), then all the other methods in ccrz.ccServiceProduct will also use API version 4.
Calling in with an API version set to more than current maximum will result in exception case where the exception class ccrz.ExceedsMaxAPIVersionException will be returned to callers. This exception indicates that the API version is not supported by the framework and the caller should use a lower API version. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, API Versioning
QUESTIONNO: 68
Which three statements are true regarding event handling in the Salesforce B2B Commerce managed package? (3 answers)
A. Salesforce B2B Commerce relies on a series of Javascript click listener events.
B. Writing directly to your own custom BackboneJS Views and Models automatically integrates that data into the Salesforce B2B Commerce Backbone Views and Models.
C. Salesforce B2B Commerce relies on a central event channel for communication across various Salesforce B2B Commerce Backbone Views and Models called CCRZ.pubSub.
D. CCRZ.pubSub defines the following three functions which can be used for event handling: trigger, on, and once.
E. CCRZ.pubSub extends the Backbone.Events JavaScript object.
Answer: C,D,E
Three statements that are true regarding event handling in the Salesforce B2B Commerce managed package are:
Salesforce B2B Commerce relies on a central event channel for communication across various Salesforce B2B Commerce Backbone Views and Models called CCRZ.pubSub. This object allows different components to publish or subscribe to events without being coupled with each other. For example, CCRZ.pubSub.trigger(‘cartChange’) will publish an event named cartChange that can be subscribed by any component that needs to react to it.
CCRZ.pubSub defines the following three functions which can be used for event handling: trigger, on, and once. The trigger function is used to publish an event with a name and optional arguments. The on function is used to subscribe to an event with a name and acallback function. The once function is similar to on, but it will only execute the callback function once for each event.
CCRZ.pubSub extends the Backbone.Events JavaScript object. This object provides methods for managing events in Backbone.js, which isa JavaScript framework that provides models, views, collections, and events for building single-page applications. CCRZ.pubSub inherits all the methods and properties of Backbone.Events and adds some custom ones. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, Events, PubSub Class