• Brian Kessler
  • NEWBIE
  • 217 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 7
    Likes Received
  • 1
    Likes Given
  • 22
    Questions
  • 63
    Replies
Hey team. While doing Trailhead modules I definitely found that Lightning Components are a huge weak point in my ability to fully grasp. As such I'm struggling to even get started on the Superbadge.

Are there additional resources outside of Trailhead that are available to try and help get a better grasp on the concepts? Thanks.
I'm currently working on the Trailhead unit Set Up Jest Test Framework (https://trailhead.salesforce.com/content/learn/modules/test-lightning-web-components/set-up-jest-testing-framework?trail_id=build-lightning-web-components)

I am in the directory with my project and I'd like to install Jest into the project.

However, Sfdx seems unable to find npm even though it is clearly installed:
 
D:\tutorials\SFDC2020\Summer20>npm --version
6.14.5

D:\tutorials\SFDC2020\Summer20>sfdx force:lightning:lwc:test:setup
ERROR running force:lightning:lwc:test:setup:  npm command not found. Verify npm is properly installed and try again.

What is wrong and how can I fix it?


 
I am almost finished with the Integrate Local and Remote Data in Einstein Analytics (https://trailhead.salesforce.com/content/learn/projects/integrate-local-and-remote-data-in-einstein-analytics) project, needing only to complete the 
Prepare Your Combined Data in a Recipe (https://trailhead.salesforce.com/content/learn/projects/integrate-local-and-remote-data-in-einstein-analytics/prepare-your-combined-data-in-a-recipe) Unit.

On my first attempt, I know I am responsible for fucking things up because I accidently named the recipe "North America Sale" and Salesforce/Wave/Einstein doesn't provide adequate tools to rename this to "North America Sales"..

Rather then redo everything, I tried to be clever: I downloaded all my metadata to IntelliJ/Illuminated Cloud and then tried to make the required chantes to src/wave/North_America_Sales.wdpr, but I couldn't upload the results because
 
23:41	Deployment Failed
			ERROR deploying WaveRecipe wave/North_America_Sales.wdpr: A Recipe must specify a Dataflow
			

23:41	Deployment Complete: Deployed 0/1 components to DTCElectronics in 1 s 311 ms with status FAILED.

After struggling for some time to find a way to make this deployment work, I eventually conceded it may be faster to just recreate the recipe.

So, I deleted the "North America Sale" receipe from Einstein Analytics and did it again, being extra careful to name it ""North America Sales".

However, now when I click "Verify step to earn 100 points", the result is:
 
Step not yet complete in bmk@dtc.de
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: PFJYMSYV

What is going wrong?
Is there any way I can get this to work without starting from scratch?
If so, how?

Thanks,
-Brian.
 
I am currently struggling with Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist), Challenge 4.

I've "created" a chart with type "Treemap".

I've given it the SAQL query:
 
beattieSubscribers = load "Beattie_Subs";
oemSurveyResponses = load "Beattie_OEM_Survey";
oemGroups = group oemSurveyResponses by ('OEM');
rowCount = foreach oemGroups generate count() as 'rowCount';

When I run the query, I get the following table:
# rowCount
1     576
2     952
3     317
4     930
5     627

But instead of a chart, I get a little yellow triangle with an error message:
 
Can't use a treemap chart because the step requires 1 measure, and either 1-2 groups if trellis is disabled or 1-4 groupings if trellis is enabled.

How do I fix this?

 
I am presently stuck on Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist) Challenge #3

The dashboard designer tells me there is an error in my Attrition Cost step
 
Warning! 
Analytics encountered a problem with this step [Attrition_Cost_1]. 
Input stream not found

My SAQL query is this:
beattieSubscribers = load "Beattie_Subs"; tenuredSubscribers = filter beattieSubscribers by{{row(Tenure_Length_1.selection,[0],["min","max"]).asRange ("Tenure")}}; churnedSubscribers = filter tenuredSubscribers by 'Churn' == "Yes"; attrCost = churnedSubscribers * 950.00;


What am I missing?
 
I am still struggling with the Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist?trailmix_creator_id=briankessler&trailmix_id=getting-started-with-analytics), step 2.

Finally my chart is displaying and my toggle switches are displaying, but the toggles are not functioning as expected.

When I select any of the three risks (e.g. "Medium Risk") the chart disappears and is replaced with a a message:
 
Can't display this widget. More Details

When I display more details I see:
 
Warning!
This widget can't be displayed because there is a problem with its source step:
The binding 'row(Tenure_Length_1.selection,[0],["min","max"]).asRange ("Tenure")' contains an error: The column name 'min' doesn't exist in the data.

However the following query seems to be working correctly:
 
beattieSubscribers = load "Beattie_Subs";
tenuredSubscribers = filter beattieSubscribers by{{row(Tenure_Length_1.selection,[0],["min","max"]).asRange ("Tenure")}};
churnedSubscribers = filter tenuredSubscribers by 'Churn' == "Yes";
groupedSubscribers = group tenuredSubscribers by all full, churnedSubscribers by all;
churnRate = foreach groupedSubscribers generate (count(churnedSubscribers) / count(tenuredSubscribers))*100 as 'churnRate';",



What do I need to do to make the toggles work correctly?
 
I'm currently still struggling with Einstein Analytics and Discovery Insights Specialist (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist?trailmix_creator_id=briankessler&trailmix_id=getting-started-with-analytics) Challenge 2:

My SAQL query is now:
 
beattieSubscribers = load "Beattie_Subs";
tenuredSubscribers = filter beattieSubscribers by row(
               Tenure_Length.selection, 
               [0], 
               ["min","max"]
          ).asRange("Tenure");
churnSubscribers = filter tenuredSubscribers by 'Churn' == "Yes";
groupedSubscribers = group tenuredSubscribers by all full, churnSubscribers by all;
churnRate = foreach groupedSubscribers generate (count(churnSubscribers) / count(tenuredSubscribers))*100 as 'churnRate';

However, this results in the following error displayed on the page:
 
Function doesn't have a type check definition:

.
What is wrong here and how can/should I fix this?

Thanks?
Hi,

I'm currently working on the App Customization Specialist Lightning Superbadge.
I'm stuck on Challenge 4 with the reported error of:
 
Challenge Not yet complete... here's what's wrong: 
The 'My Top Volunteer Organizations' report is not sorting by the correct field.

However, I have summarized the shift hours and the report is sorted by Sum of Shift Hours, as seen below:

Report Builder:User-added image


Report:User-added image

Could this error description be incorrect and misleading?
If so, what else might be wrong on this report?
(Am I even correct to believe it is a problem with this report?)
Hi,

I'm currently working on the App Customization Specialist Lightning Superbadge.
I'm stuck on Challenge 4 with the reported error of:
 
Challenge Not yet complete... here's what's wrong: 
The 'My Top Volunteer Organizations' report is not using the correct IsShiftVolunteer filter.

However, my IsShiftVolunteer filter IS set to:
 
IsShiftVolunteer equals "True"
I've tried (nonsensically) to make this equals "False" or to lock the filter, but neither of these changes helped.

Could this error description be incorrect and misleading?
If so, what else might be wrong on this report?
(Am I even correct to believe it is a problem with this report?)

Here is a screenshot of the report builder:
My Top Volunteer Organizations Report Builder

Here is a screenshot of the report:
My Top Volunteer Organizations Report

Thanks in advance,
-Brian.
I'm currently trying to Create a Connected App and Link to Alexa.

When I click "Link Account", I get a new tab which displayes an "OAuth Error":
 
We can't authorize you because of an OAuth error. For more information, contact your Salesforce administrator.

OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again.

The result page URL offers a little more information:
 
error=invalid_scope&error_description=the+requested+scope+is+not+allowed

These are the Selected OAuth Scopes for the Alexa Skill Connected App in SFDC:
Access and manage your data (api)
Provide access to your data via the Web (web)

Any ideas what is wrong or how to fix it?


 
I'm currently trying to finish the Advanced Apex Specialist, on challenge 8.

Yesterday when I tried to submit, I received the error:
Ensure that you haven't deleted the product2Trigger_UnitTest in orderTests.
... Which didn't make much sense since it Product2Trigger_UnitTest doesn't belong in OrderTests, but rather in Product2Tests.
Whatever, I copied it there, but it still failed with the same error.

I decided to call it a night.

Today, I figured I'd go back to hacking away at this, but now, the check takes forever to execute before finally invariably displaying:
Looks like something went wrong, please try again later.

Note, there haven't been actually any changes between yesterday's and today's non-passing code.
 
Hi,

I'm currently struggling with Lightning Component Framework Specialist Challenge 10.

I'm successfully using an event to pass values into the Map's client side controller, and Leaflet seems to be doing something, but:

1. The marker is displayed on a grey area, not a map.
2. When I click a second boat, instead of updating the map, an error pops up informing me "Uncaught Action failed: c:Map$controller$onPlotMapMarker [Map container is already initialized.]"

This is my onPlotMapMaker method:
 
onPlotMapMarker: function(component, event, helper) {
    	var id = event.getParam('sObjectId');
    	var lat = event.getParam('lat');
    	var long = event.getParam('long');
    	var label = event.getParam('label');

    	var mapContainer = component.find('map').getElement(); 
	    var map = L.map(mapContainer).setView([lat, long], 13);

		L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
		    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		L.marker([lat, long]).addTo(map)
		    .bindPopup(label)
		    .openPopup();
    }

What's wrong with it?


 
Hi,

I'm currently working on the Lightning Component Framework Specialist Superbadge.

When I click "New", at least as I've interpretted the requirements, the "Friends with Boats" pages is behaving as expected, but Trailhead complains:
Challenge Not yet complete... here's what's wrong: 
The BoatSearchForm component's "New" button should launch the default boat record create page using logic in its controller.

Have I misunderstood a requirement?

Here is my markup:
 
<aura:component controller="BoatSearchFormAuraCtrl" >
	<aura:attribute access="private" name="boatList" type="BoatType__c[]" default="[]" />
	<aura:attribute access="private" name="showNewButton" type="Boolean" default="false" />
	<aura:attribute access="private" name="selectedBoat" type="BoatType__c" />
	
	<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
	
	<h2 class="slds-page-header__title">Find a Boat</h2>
	<form>
		<lightning:layout horizontalAlign="center">
		    <lightning:select name="select" value="{!v.selectedBoat}">
		        <option value="">All Types</option>
		        <aura:iteration items="{!v.boatList}" var="boat">
		            <option value="{!boat.Name}" text="{!boat.Name}"></option>
		        </aura:iteration> 
		    </lightning:select>
		    <lightning:button name="Search" label="Search" variant="brand" />
		    <aura:if isTrue="{!v.showNewButton}">
		    	<lightning:button name="New" label="New" variant="neutral" onclick="{!c.createBoat}"/>
		    </aura:if>
		</lightning:layout>
	</form>	
</aura:component>
And here is my controller:
({
	doInit : function(component, event, helper) {
		component.set('v.showNewButton', $A.get('e.force:createRecord'));
		helper.setBoatTypeList(component);
	},
	
	createBoat : function(component) {
		var createRecordEvent = $A.get('e.force:createRecord');
		createRecordEvent.setParams({
			'entityApiName' : 'BoatType__c',
			'defaultFieldValues': {
				'Name': component.get('v.selectedBoat')
			},
		});
		createRecordEvent.fire();
	}
})





 
Presently, I'm trying to work my way through the "React Native" Trailhead.
I've updated my environment to use the latest Android Studio and it even can work with either a VS emulator or Nox.
I also updated the forcedroid npm plugin.

It is no problem to do a forcedroid create.

But when I execute "npm run-script start-windows", npm complains of a missing script.
   * I can, however, get the expected result if I execute "npm start" instead.

However, once I've logged into SFDC within an emulator (it doesn't matter which), the Android application complains "Could not get BatchedBridge, make sure your bundle is packaged correctly".  If I try to reload the page, I get more verbose, but not helpful suggestions.

Then I went to look at, or rather, for, the code, but there is no index.ios,js file, no index.andoid.js file, no app.js file.... in fact, no *.js files in the entire project directory....

Any ideas why I missing things and to fix my environment so I can work through this trailhead?
 
I'm currently on the last challenge for the Business Administration Specialist Superbadge.
I've uploaded both a photo for left of the header and a photo for the banner above the header.

Yet when I submit, I get this error:

Challenge Not yet complete... here's what's wrong: 
Couldn't find a photo assigned to the Chatter group.

What do I need to do to pass this challenge?

Thanks in advance,
-Brian.


 
This unit is being pushed as intermediate even though it is missing critical steps towards making use of the material it is presenting, such as step-by-step information how to successfully push the metadata we create and make use of the permissions we are uploading.

As far as I can tell, I am successfully uploading the Customer_interaction_Big_Object.permissionSet through ForceIDE, as I get no errors after save to server, but then this permission set isn't available for me to assign to anyone when I look in the SFDC setup UI for permission sets.

And then I can't upload the data because the object isn't writable, presumably because I don't have permissions.

Morever, the sample "Apex" script isn't even valid Apex.  For examples:
* There shouldn't be any angle brackets in: <Customer_Interaction__b> bo = new Customer_Interaction__b();
* Strings should use single quotes, not double quotes: bo.Account__c = "001R000000302D3";
* Play_Duration__c was defined as a number, not text (and again, double quotes!): bo.Play_Duration__c = "25";

Doesn't anyone give these articles a test drive before publishing them to people who will rely on them?
Hi,

I'm currently working on the Process Automation Specialist Superbadge and I'm struggling with Challenge #5.

Specifically, I'm currently getting the following error:
 
Challenge Not yet complete... here's what's wrong: 
An Opportunity with the Stage 'Negotiation/Review' and the Amount greater than $100,000 was not successfully submitted for approval upon creation.

I've created an approval process:
Screenshot of approval process

And I've included "Submit for Approval" as an action for the 3rd node of my process:
Opportunity Negotiation Node


Submit for Approval Settings

Any ideas what I'm doing wrong and how to fix it?

Thanks,
-Brian.
I'm currently working my way through the Build an IoT Integration with Electric Imp trailhead.
This requires an "Electric Imp Developer Kit".
I don't have one.

At this time, I'm not so serious about IoT that I would like to waste both my money and earth's limited physical resources for a device for which I have no long term use for, but will merely use for a few minutes to complete a trailhead.

Is there any possiblity to run a virtual device emulating the kit on my computer instead?
(Or, if not, could some environmentally responsible person create that possibility?)
I'm presently doing the Work with GeoJSON and Create the Map unit of Create a Custom Map for Wave Charts.
 
Because I'm an SFDC developer, and because my computer isn't presently set up for Python, I'd like to replace the "quick-and-dirty Python script" with an SFDC/Apex solution.

I've created this GeoJsonService class:
 
public class WAVE_GeoJsonService {
    DB_ContentDocumentSelector contentDocumentSelector;
    DB_ContentVersionSelector contentVersionSelector;
    
    public WAVE_GeoJsonService(DB_ContentDocumentSelector contentDocumentSelector, DB_ContentVersionSelector contentVersionSelector) {
    	this.contentDocumentSelector = contentDocumentSelector;
    	this.contentVersionSelector = contentVersionSelector;
    } 

    public WAVE_GeoJsonService() {
    	this(new DB_ContentDocumentSelector(), new DB_ContentVersionSelector());
    }

    public String zipCodeAreaReformat(String fileName) {
    	Id documentId = contentDocumentSelector.selectByTitle(fileName)[0].id;
    	Blob versionData = contentVersionSelector.selectByContentDocumentId(documentId)[0].VersionData;
    	return this.zipCodeAreaReformat(versionData);
    }
    
    @testVisible
    private String zipCodeAreaReformat(Blob jsonBlob) {
    	Map<String, Object> root = (Map<String, Object>) JSON.deserializeUntyped(jsonBlob.toString());
    	List<Object> featureFromJsonList = (List<Object>) root.get('features');
    	List<WAVE_GeoJsonFeatureModel> featureModelList = new List<WAVE_GeoJsonFeatureModel>();
    	for (Object featureFromJson : featureFromJsonList) {
    		WAVE_GeoJsonFeatureModel featureModel = new WAVE_GeoJsonFeatureModel(featureFromJson); 
    		featureModelList.add(featureModel);
    	}
    	root.put('features', featureModelList);
    	return JSON.serialize(root);
    }
    
    public ContentDocument createNewFile() {
    	// TODO:
    }
}

This can be executed like so:
String json =  (new WAVE_GeoJsonService()).zipCodeAreaReformat('la-zip-code-areas-2012');

As I've determined through System.debug statements (not included), this works as expected UNTIL SFDC needs to serialize root, at which time I get an error like:
 
DEBUG LOG
UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 524981494-154011 (1095241484)

This also happens if I try to serialize root implicitly in a System.debug statement.

Any ideas what is going wrong and how to fix it?


If it helps, here are the dependencies:
 
public class WAVE_GeoJsonFeatureModel {
	public String type {get; private set;}
	public Object properties {get; private set;} 
	public Object geometry {get; private set;}
	public String id  {get; private set;}
	
	public WAVE_GeoJsonFeatureModel(Object featureFromStandardGeoJson) {
		Map<String, Object> attributes = (Map<String, Object>) featureFromStandardGeoJson;
		this.type = (String) attributes.get('type');
		this.properties = attributes.get('properties');
		this.geometry = attributes.get('geometry');
		this.id = (String)((Map<String, Object>) attributes.get('properties')).get('external_id');
	}
}

public class DB_ContentDocumentSelector {
    public List<ContentDocument> selectByTitle(String fileName) {
    	return [
			SELECT id 
			FROM ContentDocument
			WHERE title = :fileName
		];
    }
}

public class DB_ContentVersionSelector {
    public List<ContentVersion> selectByContentDocumentId(Id contentDocumentId) {
    	return [
			SELECT versionData
			FROM ContentVersion
			WHERE contentDocumentId = :contentDocumentId
			ORDER BY VersionNumber DESC
		];
    }
}

























 
Hi!

I'm currently trying to work my way through the Trailhead "Get Started with Hybrid Development", but am having problems when I attempt to "forcedroid create".

When it gets to "Installing "cordova-plugin-whitelist" for android" it fails with:
 
Failed to install 'cordova-plugin-whitelist':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: TypeError: Path must be a string. Received undefined



This error is not imediately fatal, but after a time I see:
 
Installing "cordova-plugin-whitelist" for android
Failed to install 'cordova-plugin-whitelist':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Failed to install 'com.salesforce':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
D:\tutorials\AndroidStudioProjects
forcedroid create failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.0.0 --force
Error: Path must be a string. Received undefined



Whereas, this last bit is fatal.

FWIW,
OS: Windows XP SP3
Java: 1.8.0_121
Node: 5.12.0
Npm: 4.2.0
Cordovoa: 6.5.0

ANDROID_HOME: C:\devtools\Android\sdk
ANDROID_SDK_HOME: C:\devtools\Android\sdk
JAVA_HOME: C:\devtools\Java\jdk1.8.0_121
JDK_HOME: %JAVA_HOME%
JRE_HOME: %JAVA_HOME%\jre
CLASSPATH: .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
User PATH: %JAVA_HOME%\bin;C:\Documents and Settings\Brian Kessler\Application Data\npm
System PATH: C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Pinnacle\Shared Files\InstantCDDVD\;C:\WINXPSP3\system32\WindowsPowerShell\v1.0;C:\Program Files\Skype\Phone\;C:\Program Files\Kensington\TrackballWorks;C:\devtools\Git\cmd;C:\devtools\Git\GitExtensions\;C:\devtools\nodejs\;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools

Any ideas what is wrong or how to fix this?
I'm currently workng my way through Explore Custom Transaction Security Policies : Test the Apex for the Policy.
Perhaps at the time this module was written, the example code was valid.

However, presently: 
1. If I try to set the value of LoginHistory.platform, the Apex code is rejected with 
Error: Compile Error: Field is not writeable: LoginHistory.Platform at line 6 column 5

2. If I try to insert a LoginHistory record, the Apex code is rejected with
Error: Compile Error: DML operation INSERT not allowed on LoginHistory at line 7 column 5

I don't want to litter my production code with Test.isRunningTest().

While I could refactor the code to replace both the SOQL and the evaluation with injected dependency(s), such would leave the most critical portions of the class actually untested, which is likewise unsatisfactory.

Is it still possible to test the PolicyCondition?
Is there some trick I'm overlooking?





 
I'm currently working on the Trailhead unit Set Up Jest Test Framework (https://trailhead.salesforce.com/content/learn/modules/test-lightning-web-components/set-up-jest-testing-framework?trail_id=build-lightning-web-components)

I am in the directory with my project and I'd like to install Jest into the project.

However, Sfdx seems unable to find npm even though it is clearly installed:
 
D:\tutorials\SFDC2020\Summer20>npm --version
6.14.5

D:\tutorials\SFDC2020\Summer20>sfdx force:lightning:lwc:test:setup
ERROR running force:lightning:lwc:test:setup:  npm command not found. Verify npm is properly installed and try again.

What is wrong and how can I fix it?


 
I'm currently trying to finish the Advanced Apex Specialist, on challenge 8.

Yesterday when I tried to submit, I received the error:
Ensure that you haven't deleted the product2Trigger_UnitTest in orderTests.
... Which didn't make much sense since it Product2Trigger_UnitTest doesn't belong in OrderTests, but rather in Product2Tests.
Whatever, I copied it there, but it still failed with the same error.

I decided to call it a night.

Today, I figured I'd go back to hacking away at this, but now, the check takes forever to execute before finally invariably displaying:
Looks like something went wrong, please try again later.

Note, there haven't been actually any changes between yesterday's and today's non-passing code.
 
Hi,

I'm currently struggling with Lightning Component Framework Specialist Challenge 10.

I'm successfully using an event to pass values into the Map's client side controller, and Leaflet seems to be doing something, but:

1. The marker is displayed on a grey area, not a map.
2. When I click a second boat, instead of updating the map, an error pops up informing me "Uncaught Action failed: c:Map$controller$onPlotMapMarker [Map container is already initialized.]"

This is my onPlotMapMaker method:
 
onPlotMapMarker: function(component, event, helper) {
    	var id = event.getParam('sObjectId');
    	var lat = event.getParam('lat');
    	var long = event.getParam('long');
    	var label = event.getParam('label');

    	var mapContainer = component.find('map').getElement(); 
	    var map = L.map(mapContainer).setView([lat, long], 13);

		L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
		    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);
		
		L.marker([lat, long]).addTo(map)
		    .bindPopup(label)
		    .openPopup();
    }

What's wrong with it?


 
Presently, I'm trying to work my way through the "React Native" Trailhead.
I've updated my environment to use the latest Android Studio and it even can work with either a VS emulator or Nox.
I also updated the forcedroid npm plugin.

It is no problem to do a forcedroid create.

But when I execute "npm run-script start-windows", npm complains of a missing script.
   * I can, however, get the expected result if I execute "npm start" instead.

However, once I've logged into SFDC within an emulator (it doesn't matter which), the Android application complains "Could not get BatchedBridge, make sure your bundle is packaged correctly".  If I try to reload the page, I get more verbose, but not helpful suggestions.

Then I went to look at, or rather, for, the code, but there is no index.ios,js file, no index.andoid.js file, no app.js file.... in fact, no *.js files in the entire project directory....

Any ideas why I missing things and to fix my environment so I can work through this trailhead?
 
I'm currently on the last challenge for the Business Administration Specialist Superbadge.
I've uploaded both a photo for left of the header and a photo for the banner above the header.

Yet when I submit, I get this error:

Challenge Not yet complete... here's what's wrong: 
Couldn't find a photo assigned to the Chatter group.

What do I need to do to pass this challenge?

Thanks in advance,
-Brian.


 
This unit is being pushed as intermediate even though it is missing critical steps towards making use of the material it is presenting, such as step-by-step information how to successfully push the metadata we create and make use of the permissions we are uploading.

As far as I can tell, I am successfully uploading the Customer_interaction_Big_Object.permissionSet through ForceIDE, as I get no errors after save to server, but then this permission set isn't available for me to assign to anyone when I look in the SFDC setup UI for permission sets.

And then I can't upload the data because the object isn't writable, presumably because I don't have permissions.

Morever, the sample "Apex" script isn't even valid Apex.  For examples:
* There shouldn't be any angle brackets in: <Customer_Interaction__b> bo = new Customer_Interaction__b();
* Strings should use single quotes, not double quotes: bo.Account__c = "001R000000302D3";
* Play_Duration__c was defined as a number, not text (and again, double quotes!): bo.Play_Duration__c = "25";

Doesn't anyone give these articles a test drive before publishing them to people who will rely on them?
I'm currently working on the Trailhead unit Set Up Jest Test Framework (https://trailhead.salesforce.com/content/learn/modules/test-lightning-web-components/set-up-jest-testing-framework?trail_id=build-lightning-web-components)

I am in the directory with my project and I'd like to install Jest into the project.

However, Sfdx seems unable to find npm even though it is clearly installed:
 
D:\tutorials\SFDC2020\Summer20>npm --version
6.14.5

D:\tutorials\SFDC2020\Summer20>sfdx force:lightning:lwc:test:setup
ERROR running force:lightning:lwc:test:setup:  npm command not found. Verify npm is properly installed and try again.

What is wrong and how can I fix it?


 
I am almost finished with the Integrate Local and Remote Data in Einstein Analytics (https://trailhead.salesforce.com/content/learn/projects/integrate-local-and-remote-data-in-einstein-analytics) project, needing only to complete the 
Prepare Your Combined Data in a Recipe (https://trailhead.salesforce.com/content/learn/projects/integrate-local-and-remote-data-in-einstein-analytics/prepare-your-combined-data-in-a-recipe) Unit.

On my first attempt, I know I am responsible for fucking things up because I accidently named the recipe "North America Sale" and Salesforce/Wave/Einstein doesn't provide adequate tools to rename this to "North America Sales"..

Rather then redo everything, I tried to be clever: I downloaded all my metadata to IntelliJ/Illuminated Cloud and then tried to make the required chantes to src/wave/North_America_Sales.wdpr, but I couldn't upload the results because
 
23:41	Deployment Failed
			ERROR deploying WaveRecipe wave/North_America_Sales.wdpr: A Recipe must specify a Dataflow
			

23:41	Deployment Complete: Deployed 0/1 components to DTCElectronics in 1 s 311 ms with status FAILED.

After struggling for some time to find a way to make this deployment work, I eventually conceded it may be faster to just recreate the recipe.

So, I deleted the "North America Sale" receipe from Einstein Analytics and did it again, being extra careful to name it ""North America Sales".

However, now when I click "Verify step to earn 100 points", the result is:
 
Step not yet complete in bmk@dtc.de
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: PFJYMSYV

What is going wrong?
Is there any way I can get this to work without starting from scratch?
If so, how?

Thanks,
-Brian.
 
I am currently struggling with Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist), Challenge 4.

I've "created" a chart with type "Treemap".

I've given it the SAQL query:
 
beattieSubscribers = load "Beattie_Subs";
oemSurveyResponses = load "Beattie_OEM_Survey";
oemGroups = group oemSurveyResponses by ('OEM');
rowCount = foreach oemGroups generate count() as 'rowCount';

When I run the query, I get the following table:
# rowCount
1     576
2     952
3     317
4     930
5     627

But instead of a chart, I get a little yellow triangle with an error message:
 
Can't use a treemap chart because the step requires 1 measure, and either 1-2 groups if trellis is disabled or 1-4 groupings if trellis is enabled.

How do I fix this?

 
I am presently stuck on Einstein Analytics and Discovery Insights Specialist Superbadge (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist) Challenge #3

The dashboard designer tells me there is an error in my Attrition Cost step
 
Warning! 
Analytics encountered a problem with this step [Attrition_Cost_1]. 
Input stream not found

My SAQL query is this:
beattieSubscribers = load "Beattie_Subs"; tenuredSubscribers = filter beattieSubscribers by{{row(Tenure_Length_1.selection,[0],["min","max"]).asRange ("Tenure")}}; churnedSubscribers = filter tenuredSubscribers by 'Churn' == "Yes"; attrCost = churnedSubscribers * 950.00;


What am I missing?
 
I'm currently still struggling with Einstein Analytics and Discovery Insights Specialist (https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_analytics_insights_specialist?trailmix_creator_id=briankessler&trailmix_id=getting-started-with-analytics) Challenge 2:

My SAQL query is now:
 
beattieSubscribers = load "Beattie_Subs";
tenuredSubscribers = filter beattieSubscribers by row(
               Tenure_Length.selection, 
               [0], 
               ["min","max"]
          ).asRange("Tenure");
churnSubscribers = filter tenuredSubscribers by 'Churn' == "Yes";
groupedSubscribers = group tenuredSubscribers by all full, churnSubscribers by all;
churnRate = foreach groupedSubscribers generate (count(churnSubscribers) / count(tenuredSubscribers))*100 as 'churnRate';

However, this results in the following error displayed on the page:
 
Function doesn't have a type check definition:

.
What is wrong here and how can/should I fix this?

Thanks?
I'm really stuck on this one.

For the first part I have:
torch.manual_seed(123)

# TODO: Generate 2 clusters of 100 2d vectors, each one distributed normally, using
# only two calls of randn()
classApoints = torch.randn(100,2)
classBpoints = torch.randn(100,2)
#println(classApoints)

# TODO: Add the vector [1.0,3.0] to the first cluster and [3.0,1.0] to the second.
classApoints += torch.tensor([1.0,3.0])
classBpoints += torch.tensor([3.0,1.0])
#println(classApoints)

# TODO: Concatenate these two clusters along dimension 0 so that the points
# distributed around [1.0, 3.0] all come first
inputs = torch.cat([classApoints, classBpoints],0)
#println(inputs) - I suspect U might be missing something in here but I'm not certain

# TODO: Create a tensor of target values, 0 for points for the first cluster and
# 1 for the points in the second cluster. Make sure that these are LongTensors.
classA = classApoints.zero_().long()
classB = classBpoints.fill_(1).long()
targets = torch.cat([classA, classB])
#println(targets.type()) - pretty sure this is correct and I've confirmed they are LongTensors

For the 2nd part (where I'm having error) I've got:
# TODO: Set the random seed to 123 using manual_seed
torch.manual_seed(123)


# TODO: Initialize a Linear layer to output scores 
# for each class given the 2d examples
model = nn.Linear(2, 2)

# TODO: Define your loss function
loss_fn = nn.NLLLoss()

# TODO: Initialize an SGD optimizer with learning rate 0.1
optimizer = torch.optim.SGD(model.parameters(), lr=0.1)

# Train the model for 100 epochs 
n_epochs = 1
losses = []
for _ in range(n_epochs):
  optimizer.zero_grad() 
  preds = model(inputs)
  #println(preds)
  #println(targets)
  loss = loss_fn(preds, targets)
  losses.append(loss)
  loss.backward()
  optimizer.step()
print(f'Anwswer to Exercise 6: Loss after {n_epochs} epochs: {losses[-1]}')
      
iterations = np.arange(len(losses))
_ = plt.plot(iterations, losses, '', iterations, losses, '-')

The error I'm getting:
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-65-b59a439a8791> in <module>() 20 #println(preds) 21 #println(targets) ---> 22 loss = loss_fn(preds, targets) 23 losses.append(loss) 24 loss.backward() /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs) 489 result = self._slow_forward(*input, **kwargs) 490 else: --> 491 result = self.forward(*input, **kwargs) 492 for hook in self._forward_hooks.values(): 493 hook_result = hook(self, input, result) /usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py in forward(self, input, target) 191 _assert_no_grad(target) 192 return F.nll_loss(input, target, self.weight, self.size_average, --> 193 self.ignore_index, self.reduce) 194 195 /usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce) 1330 .format(input.size(0), target.size(0))) 1331 if dim == 2: -> 1332 return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce) 1333 elif dim == 4: 1334 return torch._C._nn.nll_loss2d(input, target, weight, size_average, ignore_index, reduce) RuntimeError: multi-target not supported at /pytorch/aten/src/THNN/generic/ClassNLLCriterion.c:22

Can anyone assist on this?
  • December 28, 2018
  • Like
  • 0
Hi,

I'm currently working on the App Customization Specialist Lightning Superbadge.
I'm stuck on Challenge 4 with the reported error of:
 
Challenge Not yet complete... here's what's wrong: 
The 'My Top Volunteer Organizations' report is not sorting by the correct field.

However, I have summarized the shift hours and the report is sorted by Sum of Shift Hours, as seen below:

Report Builder:User-added image


Report:User-added image

Could this error description be incorrect and misleading?
If so, what else might be wrong on this report?
(Am I even correct to believe it is a problem with this report?)
Hi,

I'm currently working on the App Customization Specialist Lightning Superbadge.
I'm stuck on Challenge 4 with the reported error of:
 
Challenge Not yet complete... here's what's wrong: 
The 'My Top Volunteer Organizations' report is not using the correct IsShiftVolunteer filter.

However, my IsShiftVolunteer filter IS set to:
 
IsShiftVolunteer equals "True"
I've tried (nonsensically) to make this equals "False" or to lock the filter, but neither of these changes helped.

Could this error description be incorrect and misleading?
If so, what else might be wrong on this report?
(Am I even correct to believe it is a problem with this report?)

Here is a screenshot of the report builder:
My Top Volunteer Organizations Report Builder

Here is a screenshot of the report:
My Top Volunteer Organizations Report

Thanks in advance,
-Brian.
I'm currently trying to Create a Connected App and Link to Alexa.

When I click "Link Account", I get a new tab which displayes an "OAuth Error":
 
We can't authorize you because of an OAuth error. For more information, contact your Salesforce administrator.

OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again.

The result page URL offers a little more information:
 
error=invalid_scope&error_description=the+requested+scope+is+not+allowed

These are the Selected OAuth Scopes for the Alexa Skill Connected App in SFDC:
Access and manage your data (api)
Provide access to your data via the Web (web)

Any ideas what is wrong or how to fix it?


 
Trailhead Check Challenge Button is not responding back with results.
  • January 31, 2018
  • Like
  • 15
I'm currently trying to finish the Advanced Apex Specialist, on challenge 8.

Yesterday when I tried to submit, I received the error:
Ensure that you haven't deleted the product2Trigger_UnitTest in orderTests.
... Which didn't make much sense since it Product2Trigger_UnitTest doesn't belong in OrderTests, but rather in Product2Tests.
Whatever, I copied it there, but it still failed with the same error.

I decided to call it a night.

Today, I figured I'd go back to hacking away at this, but now, the check takes forever to execute before finally invariably displaying:
Looks like something went wrong, please try again later.

Note, there haven't been actually any changes between yesterday's and today's non-passing code.
 
Trailhead Check Challenge Button is not responding back with results.
  • January 31, 2018
  • Like
  • 15