• Cristian_Cocioban
  • NEWBIE
  • 15 Points
  • Member since 2016
  • Senior Software Developer


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
I can't enable Einstein analytics in a scratch org. My scratch def file:

 
{
    "orgName": "Demo",
    "edition": "Enterprise",
    "features": ["EinsteinAnalyticsPlus"],
    "orgPreferences" : {
        "enabled": ["S1DesktopEnabled"],
        "disabled": ["S1EncryptedStoragePref2"] 
    }
}

When running force:org:create I get the error:  EinsteinAnalyticsPlus is not a valid Features value.

However EinsteinAnalyticsPlus is listed as valid value in features - here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm
Is it possible to implement geomap drill-down in Einstein Analytics? For instance displaying the World Map, click on US - show choropleth map for US by state, click on California show a custom map with counties.
I'm implementing a map in a lightning component by using leaflet. I'm getting a popup error in firefox:
"[cannot use the given object as a weak map key]" 

Same is working just fine in chrome and edge.

I've stripped all my code in controller and left only the leaflet and map div. Seems like the problem is in leaflet.js

So this all I have:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
    <ltng:require styles="/resource/leaflet/leaflet.css"
        		  scripts="/resource/leaflet/leaflet.js"/>
        
    <div id="map" aura:id="map" class="slds-card map"  ></div>
</aura:component>

Any thoughts?
 
I've activated the "Geocodes for Account Billing Address" and "Geocodes for Account Shipping Address" for my Accounts and only one of the accounts was updated with latitude and longitude, rest of the accounts are having blanks in the the geocode fields.

I've added "Data Integration Rules" in the related list for Account and by going into a record -  in the status I have "Not Found". If I click update I'm getting a popup with "There’s no match for this record, so it can’t be updated."

How is this feature working? What do I need to do?
I want to send emails from apex, I'm using Visualforce email templates. This is my code:
 
EmailTemplate templateId = [Select id from EmailTemplate where DeveloperName = 'User_Template'];
OrgWideEmailAddress[] owea = [select Id from OrgWideEmailAddress LIMIT 1];

               	
for(User usr: users) {
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();

    if ( owea.size() > 0 ) {
        email.setOrgWideEmailAddressId(owea.get(0).Id);
    }
			
    email.setSaveAsActivity(false);
    email.setSubject('Test Subject');			
    email.setTargetObjectId(usr.Id);
    email.setTemplateID(templateId.Id); 

    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });  
}

Email template:
<messaging:emailTemplate subject="Test" recipientType="User">
	<messaging:htmlEmailBody >
		this is a test
	</messaging:htmlEmailBody>
</messaging:emailTemplate>



It's sending the email but the body is empty. 

When sending from setup and using "Send Test and Verify Merge Fields" - it works - body is sent.

I've tried this: Sending Emails in Salesforce to Non-Contacts Using Apex . It throws an error a null reference error, I've checked in the log and the emailBody is null.

I've tried setting email.setWhatId(usr.Id);  - no change

The only solution that worked was building the message as string in apex and using email.setHtmlBody(someString);

However I'm curious of why using the template doesn't work, any help would be highly appreciated.
Create the package version - Step 5
Error Attempt to create unlocked pkg step 5
Following Error:
ERROR:  An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 1394095453-59495 (-1373703285).

Anyone know what this is?
DevHub set up; Packaging2 Beta enabled in DevHub; and I have an active GitHub account.
I'm implementing a map in a lightning component by using leaflet. I'm getting a popup error in firefox:
"[cannot use the given object as a weak map key]" 

Same is working just fine in chrome and edge.

I've stripped all my code in controller and left only the leaflet and map div. Seems like the problem is in leaflet.js

So this all I have:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
    <ltng:require styles="/resource/leaflet/leaflet.css"
        		  scripts="/resource/leaflet/leaflet.js"/>
        
    <div id="map" aura:id="map" class="slds-card map"  ></div>
</aura:component>

Any thoughts?
 
I want to send emails from apex, I'm using Visualforce email templates. This is my code:
 
EmailTemplate templateId = [Select id from EmailTemplate where DeveloperName = 'User_Template'];
OrgWideEmailAddress[] owea = [select Id from OrgWideEmailAddress LIMIT 1];

               	
for(User usr: users) {
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();

    if ( owea.size() > 0 ) {
        email.setOrgWideEmailAddressId(owea.get(0).Id);
    }
			
    email.setSaveAsActivity(false);
    email.setSubject('Test Subject');			
    email.setTargetObjectId(usr.Id);
    email.setTemplateID(templateId.Id); 

    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });  
}

Email template:
<messaging:emailTemplate subject="Test" recipientType="User">
	<messaging:htmlEmailBody >
		this is a test
	</messaging:htmlEmailBody>
</messaging:emailTemplate>



It's sending the email but the body is empty. 

When sending from setup and using "Send Test and Verify Merge Fields" - it works - body is sent.

I've tried this: Sending Emails in Salesforce to Non-Contacts Using Apex . It throws an error a null reference error, I've checked in the log and the emailBody is null.

I've tried setting email.setWhatId(usr.Id);  - no change

The only solution that worked was building the message as string in apex and using email.setHtmlBody(someString);

However I'm curious of why using the template doesn't work, any help would be highly appreciated.