ExamGecko
Question list
Search
Search

Question 122 - Certified B2B Commerce Developer discussion

Report
Export

An administrator has just provided a developer with a completely new org and a username. Assuming the username is [email protected], what is the correct set of steps to authorize the org for Command Line Interface (CLI) access so the developer can deploy Lightning web components?

A.
Run the command: 'sfdx force:login -r 'https://login.salesforce.com'' and supply the credentials in the browser when it opens.
Answers
A.
Run the command: 'sfdx force:login -r 'https://login.salesforce.com'' and supply the credentials in the browser when it opens.
B.
Run the command 'sfdx force:auth:web:login -a 'https://login.salesforce.com''' and then supply the credentials in the browser when it opens.
Answers
B.
Run the command 'sfdx force:auth:web:login -a 'https://login.salesforce.com''' and then supply the credentials in the browser when it opens.
C.
Run the command: 'sfdx force:auth:web:login -r 'https://login.salesforce.com' and then supply the credentials in the ^ browser when it opens ^
Answers
C.
Run the command: 'sfdx force:auth:web:login -r 'https://login.salesforce.com' and then supply the credentials in the ^ browser when it opens ^
D.
Run the command 'sfdx force:auth:web:login -r 'https://login.salesforce.com' -username^'mefaJmy-new-org.org''
Answers
D.
Run the command 'sfdx force:auth:web:login -r 'https://login.salesforce.com' -username^'mefaJmy-new-org.org''
Suggested answer: C

Explanation:

To authorize the org for Command Line Interface (CLI) access so the developer can deploy Lightning web components, the developer should run the command: 'sfdx force:auth:web:login -r ''https://login.salesforce.com'' and then supply the credentials in the browser when it opens. The sfdx force:auth:web:login command is a Salesforce CLI command that authorizes an org using the web server flow. The web server flow is an OAuth 2.0 authentication flow that opens a browser window and prompts the user to log in to Salesforce and allow access to the CLI. The -r flag specifies the login URL of the org, which is https://login.salesforce.com for production or developer orgs. Running this command will open a browser window and ask the developer to enter their username and password for the org. After successfully logging in, the developer will be able to use the CLI to perform various tasks with the org, such as deploying or retrieving metadata, running tests, or executing commands. Running the command: 'sfdx force:login -r ''https://login.salesforce.com'' is not a valid way to authorize the org for CLI access, as there is no such command as sfdx force:login. Running the command 'sfdx force:auth:web:login -a ''https://login.salesforce.com''' is not a valid way either, as the -a flag specifies an alias for the org, not a login URL. Running the command 'sfdx force:auth:web:login -r ''https://login.salesforce.com'' -username'[email protected]'' is not a valid way either, as there is no such flag as -username. Salesforce

Reference:Salesforce CLI Command Reference: force:auth:web:login,Salesforce Developer Tools for Visual Studio Code

asked 23/09/2024
Lee Michael
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first