Which two blocks of code are needed to implement a custom getter in a Lightning web component?
A)

B)

C)

D)

Answer : A, D
custom getter in a Lightning web component is a JavaScript function that executes logic each time a public property is accessed. A custom getter must start with the keywordgetand be followed by a name for the property. A custom getter must also have a corresponding custom setter, which is a function that executes logic each time a public property is assigned a value. A custom setter must start with the keywordsetand have the same name as the getter. One of the getter or setter functions must be annotated with@api, which makes the property public and reactive.
Option A and Option D show the correct syntax for defining a custom getter and setter for a public property calledname. Option A shows the getter function, which returns the value of a private property called_name. Option D shows the setter function, which assigns the value of the parametervalueto the private property_name. The getter function is annotated with@api, which makes thenameproperty public and reactive.
Option B and Option C are incorrect because they do not follow the syntax for a custom getter and setter. Option B shows a regular function declaration, not a getter function. Option C shows a regular assignment statement, not a setter function. Neither option uses the@apidecorator, which is required for a public property.Reference:
Getters and Setters
Understand getter in Lightning Web component
The ccUtil apex class in Salesforce B2B Commerce provides numerous utility
functions that can be leveraged in subscriber classes. Which command will return the
value in the given Map if found or a default value in the event that the Map is null,
empty, or an object is not found for that key?
Answer : B
The ccrz.ccUtil.defVal (Map<String.Object> mp, String key, Object ob) method will return the value in the given Map if found or a default value in the event that the Map is null, empty, or an object is not found for that key. This method is useful for providing fallback values for configuration settings or input parameters that may be missing or invalid. Salesforce Reference:B2B Commerce and D2C Commerce Developer Guide,ccUtil Class
A query containing a subquery is executed. What is appended to the subquery name
as part of its transformation by default in Salesforce B2B Commerce?
Answer : B
A query containing a subquery is executed. By default, in Salesforce B2B Commerce, ''__ccrz'' is appended to the subquery name as part of its transformation. This is done to avoid conflicts with the standard Salesforce fields and relationships. For example,SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Accountwill be transformed toSELECT Id, Name, (SELECT Id, Name FROM Contacts__ccrz) FROM Account__ccrz. Salesforce Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation
Which format is the custom Salesforce relationship with the API name,
"My_Relationship_Name__r.My_Name__c" queried and transformed into dy default in
Salesforce B2B Commerce?
Answer : C
The format that the custom Salesforce relationship with the API name, My_Relationship_Name__r.My_Name__c is queried and transformed into by default in Salesforce B2B Commerce is myRelationshipName.myName: value. This is done to follow the JavaScript naming convention and to avoid conflicts with the standard Salesforce fields and relationships. The transformation rules are as follows:
Remove any namespace prefix from the field name, such as ccrz__ or cloudcraze__.
Remove any underscores from the field name and capitalize the first letter of each word after an underscore, such as MyRelationshipName and MyName.
Lowercase the first letter of the field name, such as myRelationshipName and myName.
Use a dot (.) to separate the relationship name and the field name, such as myRelationshipName.myName.
Use a colon (:) to separate the field name and the field value, such as myRelationshipName.myName: value. Salesforce Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation
Which two components in a B2B store template should a developer use to customize a storefront page?
Answer : A, B
Two components in a B2B store template that a developer can use to customize a storefront page are My Lists and Product List. My Lists is a standard component that displays and manages lists of products that customers can create, save, or share in the storefront. A developer can use this component to enable customers to organize their favorite or frequently purchased products into lists and access them easily. Product List is a standard component that displays and filters products from one or more product lists in the storefront. A developer can use this component to showcase products from different categories or collections and allow customers to browse or search for products based on various criteria. Order List is not a component in a B2B store template, but rather an object that stores information about orders placed by customers in the storefront. Address List is not a component either, but rather an object that stores information about addresses associated with customers in the storefront. Salesforce Reference: [B2B Commerce Developer Guide: My Lists Component], [B2B Commerce Developer Guide: Product List Component], [B2B Commerce Developer Guide: Order List Object], [B2B Commerce Developer Guide: Address List Object]
A developer needs to debug a flow tracing a single input in complete detail, watching all variable changes as the checkout process is executed. Which feature should the developer enable? ~.
Answer : D
To debug a flow with detailed tracing of a single input, including watching all variable changes as the checkout process is executed, the developer should enable 'Show execution details' (inline) within the Flow Debugger. This feature allows developers to see a step-by-step execution of the flow, including the values of variables at each step. This is crucial for understanding how data is being passed through the flow and for identifying any issues. Salesforce documentation on debugging flows provides more information on this feature: Salesforce Flow Debugging Documentation.
Which three data types are supported for custom fields while using CSV file format for importing data for a store?
Answer : A, C, E
Three data types that are supported for custom fields while using CSV file format for importing data for a store are Text Area(Long), Lookup Relationship, and Currency. A custom field is a field that is added by a developer or an administrator to an object to store additional information or data. A data type is a property that defines the type, format, and validation rules of a field. A CSV file is a file format that stores tabular data in plain text using commas to separate values. A store is a record that represents a B2B or B2C storefront in Salesforce. Text Area(Long) is a data type that allows users to enter up to 131,072 characters on separate lines. Text Area(Long) is supported for custom fields while using CSV file format for importing data for a store. Lookup Relationship is a data type that allows users to create a relationship between two objects and select a value from another record. Lookup Relationship is supported for custom fields while using CSV file format for importing data for a store. Currency is a data type that allows users to enter currency values and automatically convert them based on the user's locale and currency settings. Currency is supported for custom fields while using CSV file format for importing data for a store. Picklist (Multi-Select) is a data type that allows users to select one or more values from a predefined list of values. Picklist (Multi-Select) is not supported for custom fields while using CSV file format for importing data for a store. Address is a data type that allows users to enter address values and automatically format them based on the user's locale settings. Address is not supported for custom fields while using CSV file format for importing data for a store. Salesforce Reference: [Salesforce Help: Custom Field Attributes], [Salesforce Help: Data Types], [Data Loader Guide: Import Data into Salesforce], [B2B Commerce Developer Guide: Store Object]