Show answerHide answer
Correct answer: B, C The close method of ccrz.ccLog must be called at the end of the remote action. No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed.
Explanation
Explanation:This question focuses on logging best practices used internally by the Salesforce B2B Commerce (CCRZ) core product. Salesforce is very intentional about logging because of performance, security, and log noise concerns.
✅ B. The close method of ccrz.ccLog must be called at the end of the remote action
This is accurate.
ccrz.ccLog buffers log entries during execution.
Calling the close() method:
- Flushes the log
- Finalizes the log entry correctly
Failing to call close() can result in:
- Incomplete logs
- Lost or malformed logging data
This is a documented guideline used by the core B2B Commerce product.
✅ C. No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed
This is accurate.
cc_CallContext.initRemoteContext establishes:
- Execution context
- User/session details
- Request scope
Logging before this initialization:
- Lacks required context
- Can cause incorrect or missing log metadata
Salesforce enforces this ordering internally, making this a key exam point.
Why the other options are incorrect
❌ A. Items or data within computational intensive loops should be logged
This is explicitly discouraged.
Logging inside intensive loops:
- Hurts performance
- Produces excessive log volume
Core B2B Commerce avoids this pattern.
❌ D. It is okay to log any data on the server that is already logged on the client side
This violates logging efficiency and data minimization principles.
Core guidelines avoid:
- Duplicate logs
- Redundant data
Client-side logging does not justify server-side duplication.
Exam tip 🧠
When you see logging guidelines in B2B Commerce:
- Think performance
- Think context initialization
- Think clean log lifecycle (open → log → close)
Avoid answers that promote excessive or redundant logging.
Reference
Salesforce B2B Commerce Developer Guide
Salesforce Docs: CCRZ Logging Best Practices