FIXED! ERROR running force:mdapi:retrieve: is not a function

Ran into this fun error message today when attempting to pull from a Salesforce sandbox from the CLI:

ERROR running force:mdapi:retrieve: is not a function

Most of what I found on the web was FUD and also about trying to push rather than pull. The comments all seem to agree it was related to the recent update for Enhanced Domains on Winter23-enabled sandboxes.

Fortunately for me, I had just added another org to my CLI. I was surprised at no approval prompt and it got me to thinking that I had probably authorized it before. So it occured to me that the fix may just be to run the authorization again, i.e.,

sfdx force:auth:web:login --setalias [ALIAS] --instanceurl [MY.DOMAIN.URL]

And that did the trick for me. Hope this helps others.

© Scott S. Nelson

Salesforce Trailhead “Challenge not yet complete” most common cause

Ah, Spring is in the air. So are arms, as people new to Salesforce throw them up during Trailhead challenges where they can’t seem to get the hands-on part to pass even though they see the result they expect.

The Trailhead modules and Superbadges are so well organized and written, it may seem like there is an instructor reviewing you submissions, but that would not be practical, profitable, or in the spirit of a cloud platform. The scoring is done by automated tests that are checking that things match exactly as the instructions provided.

The most common cause is that the learner has mis-typed a value provided, usually the API name (i.e., my_variable__c). Runner up to this is the experienced user who is new to Trailhead and uses their own naming conventions rather than following the instructions (been there, done that).

The third common cause is that the module content was updated but the test was not (doesn’t happen that often, but you can tell when there are a bunch of questions on the Trailhead Community about the same problem).


© Scott S. Nelson

Lightning Email Template Builder Newbie Gotcha

While the Salesforce Winter ’21 Release Notes mention:

NOTE Email Template Builder isn’t available for previously created Classic and Lightning email templates.

What I did not expect is that it doesn’t matter so much that the template was created before the release, but that the creator of the template had been granted the Access Drag-and-Drop Content Builder System Permission (per Select Who Can Work in Email Template Builder) before creating the template.

How did I discover this? I created a template as a System Administrator and did not see the Edit in Builder button. I then created a permission set and added it to my profile. Still not there. I then spent a lot of time trying different browsers and turning the permission off and on again, all to no avail. Then I created another template and, voilà!  there was the button.

I am either the only one dumb enough to perform the steps in this particular sequence or brave enough to admit it, as part of the time spent figuring it out was searching Trailblazers and for answers or even similar problems.

© Scott S. Nelson