AP-202試験解説問題、AP-202リンクグローバルJpexamがもっと早くSalesforceのAP-202認証試験に合格させるサイトで、SalesforceのAP-202「B2B Commerce for Developers Accredited Professional」認証試験についての問題集が市場にどんどん湧いてきます。Jpexamを選択したら、成功をとりましょう。 Salesforce B2B Commerce for Developers Accredited Professional 認定 AP-202 試験問題 (Q162-Q167):質問 # 162
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?
A. An Apex method returning a Continuation will need to be created
B. Requests to the service should be brokered to prevent limit exceptions
C. A new Remote Site may need to be created in Setup
D. new Named Credential may need to be created in Setup
E. A new CORS entry may need to be created in Setup
正解:A、D、E
解説:
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
質問 # 163
A developer has made some changes to the products of an existing storefront, but they are unable to see the changes in the products from the store.
Which action did the developer forget to take?
A. Publish the storefront.
B. Rebuild the search index.
C. Publish the catalog
D. Activate the product list.
正解:A
解説:
The developer forgot to publish the storefront after making changes to the products. Publishing the storefront is a necessary step to make the changes visible to the store visitors. Publishing the storefront updates the site's metadata and content, and also triggers the site index and search index rebuilds. If the developer does not publish the storefront, the changes will not be reflected on the live site.
The following actions are not required or relevant for the scenario:
Activate the product list. This action is only needed when creating a new product list or modifying an existing one. It does not affect the visibility of the products on the storefront.
Rebuild the search index. This action is automatically performed when the developer publishes the storefront. It is not a separate step that the developer needs to take manually.
Publish the catalog. This action is not applicable for Salesforce B2B Commerce for Visualforce, which does not use catalogs. Catalogs are only used by Salesforce B2B Commerce for Lightning Experience.
Finalize and Publish Your Storefront
Customize the D2C Store Template
Configure Public Pages for a Storefront
質問 # 164
Northern Tail Outfitters (NTO) is converting an existing aura component into a Lightning Web Component. The aura component has the following source code:
What is the equivalent of this code in a Lightning Web Component?
A.
B.
C.
D.
正解:B
解説:
The equivalent of this code in a Lightning web component is option B. Option B uses the @api decorator to expose firstName as a public property of the Lightning web component and communicate it with other components or services. The @api decorator is a decorator that marks a property or method as public, which means that it can be accessed by other components or services that use or consume this component. The @api decorator also makes the property reactive, which means that it can track changes and update the component accordingly. In option B, firstName is exposed as a public property using the @api decorator and passed to the child element using an attribute. Option A is incorrect because it uses an invalid syntax for exposing firstName as a public property. The @api decorator should be used before the property declaration, not after it. Option C is incorrect because it uses an invalid syntax for exposing firstName as a public property. The @api decorator should be used with parentheses, not without them. Option D is incorrect because it uses an invalid syntax for exposing firstName as a public property. The @api decorator should be used with camel case, not with hyphens. Salesforce Lightning Web Components Developer Guide: Communicate with Properties, Lightning Web Components Developer Guide: Decorators
質問 # 165
Which method signature is used in the Global API's?
A. Changes based on API and Method name
B. ccrz.cc_Output (ccrz:cc_Input input)
C. Map<String, Object>
D. List<List<Object>>
正解:B
解説:
The method signature that is used in the Global API's is ccrz.cc_Output (ccrz.cc_Input input). This signature indicates that the Global API methods take a single input parameter of type ccrz.cc_Input and return an output of type ccrz.cc_Output. These are custom classes that are defined in the cloudcraze managed package and contain various properties and methods for handling the input and output data. For example,ccrz.ccServiceProduct.getProducts(ccrz.cc_Input input)is a Global API method that takes an input object and returns an output object containing product data. Salesforce B2B Commerce and D2C Commerce Developer Guide,API Classes,cc_Input Class,cc_Output Class
質問 # 166
What two kinds of queries do the methods in Salesforce B2B Commerce services perform by default? (2 answers)
A. SQL
B. SOQL
C. Schema-less queries
D. SOSL
正解:B、C
解説:
Two kinds of queries that the methods in Salesforce B2B Commerce services perform by default are SOQL and schema-less queries. SOQL is the query language that is used to retrieve data from Salesforce objects and fields. Schema-less queries are queries that do not specify the object or field names explicitly, but use placeholders instead. For example,ccrz.ccServiceDao.getQuery('SELECT Id FROM Account WHERE Name = :name')is a schema-less query that uses :name as a placeholder for the field name. The framework will transform this query to use the actual field name based on the query transformation rules. Salesforce B2B Commerce and D2C Commerce Developer Guide,Query Transformation