Witch static method invocation is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an apex @RemoteAction methos?

Witch static method invocation is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an apex @RemoteAction methos?
A . ccrz.cc_CallContext.init(ccrz.cc_RemoteActionContext)
B . ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext)
C . ccrz.cc_CallContext.initRemoteActionContext(ccrz.cc_RemoteActionContext)
D . ccrz.cc_CallContext.initializeCallContext(ccrz.cc_RemoteActionContext)

Answer: B

Explanation:

The static method invocation that is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an Apex @RemoteAction method is ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext). This method takes in a ccrz.cc_RemoteActionContext object as a parameter and returns a ccrz.cc_RemoteActionResult object. The ccrz.cc_RemoteActionContext object contains information about the current storefront, user, cart, price list, currency, locale, and session. The ccrz.cc_RemoteActionResult object contains information about the status, result, and errors of the remote action. The other methods are not valid or do not exist.

Salesforce Reference: B2B Commerce

Developer Guide: cc_CallContext Class, B2B Commerce Developer Guide: cc_RemoteActionContext

Class, B2B Commerce Developer Guide: cc_RemoteActionResult Class

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments