Free Salesforce B2B-Commerce-Developer Exam Actual Questions

The questions for B2B-Commerce-Developer were last updated On Jan 15, 2025

Question No. 1

Which two user permissions in addition to View Setup and Configuration are required to bulk create Product data translations via Data Loader?

Show Answer Hide Answer
Correct Answer: A, D

To bulk create product data translations via Data Loader, permissions beyond View Setup and Configuration are necessary. 'Import Custom Objects' permission is required to import bulk data into Salesforce, including translations for custom objects. 'Manage Translations' permission is essential for managing translation workbench settings and importing/exporting translation files, which is crucial for handling product data translations.


Question No. 3

A developer needs to make a call to a long running web service which is critical to finalizing their checkout process. Which three items should the developer consider in their implementation?

Show Answer Hide Answer
Correct Answer: A, B, C

A developer needs to make a call to a long running web service which is critical to finalizing their checkout process. The developer should consider the following items in their implementation:

A new CORS entry may need to be created in Setup. CORS stands for Cross-Origin Resource Sharing, which is a mechanism that allows web browsers to make requests to servers on different domains. If the web service is hosted on a different domain than the B2B Commerce site, the developer may need to add a CORS entry in Setup to allow the browser to access the web service.This entry specifies the origin, path, and method of the request, as well as any headers or cookies that are allowed1.

A new Named Credential may need to be created in Setup. A Named Credential is a type of metadata that stores the URL and authentication settings of a web service. By using a Named Credential, the developer can avoid hardcoding the web service URL and credentials in their code, and instead reference the Named Credential by name.This makes the code more secure and easier to maintain2.

An Apex method returning a Continuation will need to be created. A Continuation is a special type of Apex object that allows the developer to make asynchronous calls to long running web services. By using a Continuation, the developer can avoid blocking the main thread and improve the user experience.A Continuation method must return a Continuation object, specify the web service URL and parameters, and register a callback method that handles the response3.

Option D and Option E are incorrect because they are not relevant to the scenario. Option D suggests that the developer should broker the requests to the web service, which means to use an intermediary service that manages the requests and responses. This may be useful for some scenarios, but it is not required for making a call to a long running web service. Option E suggests that the developer should create a new Remote Site in Setup, which is a way to whitelist the domains that can be accessed from Apex code.However, this is not necessary if the developer uses a Named Credential, which automatically handles the Remote Site setting2.Reference:

Set Up CORS

Named Credentials

Continuation Class


Question No. 4

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

A)

B)

C)

D)

Show Answer Hide Answer
Correct 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


Question No. 5

Which practice is allowed when it comes to naming a Lightning web component's folder and associated files?

Show Answer Hide Answer