Exam4Training

Which service method should be overridden in order to allow "without sharing" queries?

Which service method should be overridden in order to allow "without sharing" queries?
A . ccrz.ccService.queryWithoutSharing()
B . ccrz.ccAPI.queryService()
C . ccrz.ccService.query()
D . ccrz.ccService.initSVCDAO()

Answer: D

Explanation:

The service method that should be overridden in order to allow “without sharing” queries is ccrz.ccService.initSVCDAO. This method is responsible for initializing the service data access object (SVCDAO) that is used by the service class to perform queries. By overriding this method, the user can specify the sharing mode of the SVCDAO, which will determine whether the queries respect or ignore the sharing rules of the current user.

For example, ccrz.ccService.initSVCDAO(ccrz.ccAPI.SZ_WITHOUTSHARING) will initialize the SVCDAO with the without sharing mode.

Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Service Classes, ccService Class

Exit mobile version