+ Start a Discussion
Tom Coffey 4Tom Coffey 4 

SFDX: Get Ready to Create an App => Unexpected Arguments Error

I'm working on the SFDX: Get Ready to Create an App Trailhead module
https://trailhead.salesforce.com/content/learn/modules/sfdx_app_dev/sfdx_app_dev_create_app

It's just copying commands from Trailhead and pasting them into the command prompt.  

Everything was going fine until I got to the "Create Sample Data" section.  I copy and paste the first command from that section into my command prmopt and get an "Unexpected Arguments Error"

Here's a screenshot: https://imgur.com/a/dcNOIk9

Any help would be appreciated.  Thanks!
Best Answer chosen by Tom Coffey 4
Tom Coffey 4Tom Coffey 4
The code provided in Trailhead has double quotes on the outside and single quotes on the inside:
sfdx force:data:record:create -s Account -v 'Name="Marriott Marquis" BillingStreet="780 Mission St" BillingCity="San Francisco" BillingState="CA" BillingPostalCode="94103" Phone="(415) 896-1600" Website="www.marriott.com"'

I found a 3rd party tutorial online that showed the sfdx force:data:record:create command used with the single quotes on the outside and the double quotes on the inside.

I changed the Trailhead code to follow that pattern and it worked.

Here's the updated code.
sfdx force:data:record:create -s Account -v "Name='Marriott Marquis' BillingStreet='780 Mission St' BillingCity='San Francisco' BillingState='CA' BillingPostalCode='94103' Phone='(415) 896-1600' Website='www.marriott.com'"

Thanks to Raj Vakati for the tutorial with the correctly formatted command.  Link to his SFDX tutorial (https://rajvakati.com/2018/03/21/salesforce-dx-absolute-beginner-part-7-of-7/).