Probably user error :( but here goes.
I have a sandbox that has very recently been upgraded to Spring '21 (prerelease). I see the funky bear with the funky heart; I can go to dev console and look at the api dropdown list and see the V51 is now in the list. I'm thinking it is Spring '21.
I am itching to go play with Salesforce Functions, so I need to upgrade the sfdx cli and plugins yes? I do this : sfdx plugins:install salesforcedx@pre-release and get this : Installing plugin salesforcedx... installed v50.1.1 and this command : sfdx plugins --core shows list (among other things ) : salesforcedx 50.1.1 (pre-release)
Errr uhmmm. is that the prerelease version that corresponds to the Spring '21 release? I'm guessing not.
Have I totally failed the test by doing something totally wrong here? Where the plot actually thickens even further, is if I forget my sfdx problems for a bit, I simply go to the dev console (and pretending that I have created a function I could call) try and compile this bit of code (directly for the apex developer reference)
functions.Function accountFunction = functions.Function.get('AccountFunction');
functions.FunctionInvocation invocation = accountFunction.invoke('{ "accountName" : "Acct",
"contactName" : "MyContact", "opportunityName" : "Oppty" }');
String jsonResponse = invocation.getResponse();
I get compile error Type is not visible: functions.Function
Please don't tell me the function AccountFunction is not defined. I know that :) And yes, I set the API version to 51 when saving the code...
Hmmm.. Yep, I've totally failed the test :( Please can someone save me ?
Thanks Peter.