• Emilien Guichard 40
  • NEWBIE
  • 235 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 19
    Questions
  • 36
    Replies
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?
Hello,

Is there a way to opt out from Salesforce developer forum emails ?
Every time somebody responds to a topic I have participated to, I get a notification email.
This is kind of boring, especially for topic I have resolved a long time ago.

Thanks for your help!
Hello,

Did someone managed to pass the third step of the "Empower Your Salesforce Users" badge ?
It has been added recently and it is keeping on falling with the error  :

"Challenge not yet complete in My Trailhead Playground
We couldn't find a question with display logic. Make sure one of your questions has display logic."

And I do have a display logic working on the "Tell us what didn’t go well with the installation" question :

User-added image
Thanks for the help !
Hello there,

I'm playing with the new lightning:map component and I'm trying to use a query to get account locations on the map.
I am currently experimenting this error : "render threw an error in 'lightning:map' [Cannot read property 'length' of null]"

Here is my code :
map component :
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="AccountLocation">

        <!-- attributes -->
        <aura:attribute name="mapMarkers" type="Object"/>
        <aura:attribute name="zoomLevel" type="Integer" />
    
        <!-- handlers-->
        <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    
        <!-- the map component -->
        <lightning:map 
            mapMarkers="{! v.mapMarkers }" 
            zoomLevel="{!v.zoomLevel}" />
    
</aura:component>

controller :
({   
     init: function (component, event, helper) {
        var action = component.get("c.getAccount");
        action.setCallback(this, function(response) {
            console.log('response'+response);
            var state = response.getState();
            console.log(state);
            if (state == "SUCCESS") {
                var obj =response.getReturnValue() ;
                console.log(obj);
                
                component.set('v.mapMarkers', obj);
                component.set('v.zoomLevel', 4);
            }
            
        });
        $A.enqueueAction(action); 
    }
    
})

apex controller:
public class AccountLocation {
    @AuraEnabled
    public static List<Location> getAccount() {
        List< Account> accs =  [Select Id, Name,Type, Industry, BillingAddress,BillingStreet,
                                BillingCity, BillingCountry, BillingPostalCode,
                                Phone From Account where BillingCountry = 'France'] ;
        
        List<Location> loc = new List<Location>();
        for(Account acc :accs){
            GeoLocation geoInfo = new GeoLocation();
            geoInfo.Street = acc.BillingStreet;
            geoInfo.PostalCode = acc.BillingPostalCode;
            geoInfo.City = acc.BillingCity;
            geoInfo.Country = acc.BillingCountry;
            Location locDetail = new Location();
            locDetail.icon = 'standard:account'; 
            locDetail.title = acc.Name;
            locDetail.description = acc.Name;
            locDetail.location = geoInfo;
            
            loc.add(locDetail);
        }
        return loc ;
    }
    public class Location{
        @AuraEnabled 
        public String icon{get;set;} 
        @AuraEnabled 
        public String title{get;set;} 
        @AuraEnabled
        public String description{get;set;} 
        @AuraEnabled 
        public GeoLocation location{get;set;} 
    }
    public class GeoLocation{
        @AuraEnabled 
        public String Street{get;set;}
        @AuraEnabled 
        public String PostalCode{get;set;}
        @AuraEnabled 
        public String City{get;set;}
        @AuraEnabled 
        public String Country{get;set;}
    }
}

Thanks for your help !
Hello there,

I'm trying to complete the module Build an Einstein Bot but at the step Set Up an Einstein Bot no welcome email is received after activatings bots.
The result is a connexion error when previewing the chat.

Could you please assist ?
Thanks!
Hi there,

I'm having an issue with the newly released Share CRM Data with Your Partners trailhead module, in the Create a Partner Portal and Partner Users challenge I get the following error :

User-added image

I do have created a community called Ursa Major :
User-added image

Could you please assist ?
Thanks a lot !
 
Hi there,

I'm facing an issue at the step 3 of the Advanced Apex Superbadge, on the Product2New page the List Price is not editable :

User-added image

In the Visualforce page I'm using :
<apex:column headerValue="{!$ObjectType.PriceBookEntry.fields.UnitPrice.label}" >
    <inputField value="{!p.pricebookEntryRecord.UnitPrice}" />
</apex:column>
and in the controller extension class Product2Extension, here is my wrapper :
public class ProductWrapper {
        public Product2 productRecord {get; set;}
        public PriceBookEntry pricebookEntryRecord {get; set;}
        
        public productWrapper() {
            productRecord = new product2(Initial_Inventory__c = 0);
            pricebookEntryRecord = new pricebookEntry();
        }
}
Any piece of advice to get this working ?

Thanks a lot !


 
Hi everybody,

I'm experimenting an issue on the Advanced Apex Specialist Superbadge at the step 5, when I run the tests Product2Tests and OrderTest the SetupTestData is not able to get the pricebook id.
I have a "System.QueryException: List has no rows for assignment to SObject" error.

Here is the Constants class :
 
public class Constants {
   public static final Integer DEFAULT_ROWS = 5;
   public static final String SELECT_ONE = System.Label.Select_One;
   public static final String INVENTORY_LEVEL_LOW = System.Label.Inventory_Level_Low;
   public static final List <Schema.PicklistEntry> PRODUCT_FAMILY = Product2.Family.getDescribe().getPicklistValues();
   public static final String DRAFT_ORDER_STATUS = 'Draft';
   public static final String ACTIVATED_ORDER_STATUS = 'Activated';
   public static final String INVENTORY_ANNOUNCEMENTS = 'Inventory Annoncements';
   public static final String ERROR_MESSAGE = 'An error has occured, please take a screenshot with the URL and send it to IT.';
   public static final Id STANDARD_PRICEBOOK_ID = [SELECT Id From Pricebook2 WHERE IsStandard = true].Id;
}
and the test class:
@isTest
private class OrderTests {
    
    @testSetup
    static void SetupTestData() {
	    TestDataFactory.InsertTestData(Constants.DEFAULT_ROWS);
    }
}
Thanks a lot for your help on this.
Have a good day !
 
Hello there,

I'm currently having a styling issue at the the step 3 of the Trailhead Lightning Component Framework Specialist,

here is what it's currently looks like :

User-added image

and what it is supposed to look :

User-added image

This is the BoatTile component code :
 
<aura:component >

    <aura:attribute name="boat" type="Boat__c" />
    <aura:attribute name="selected" type="Boolean" default="false" />
    
    <aura:registerEvent name="BoatSelect" type="c:BoatSelect"/>
    <aura:registerEvent name="BoatSelected" type="c:BoatSelected"/>

        <lightning:button class="{! v.selected == true ? 'tile selected' : 'tile' }" onclick="{!c.onBoatClick}">
            <div style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}" class="innertile">
                <div class="lower-third">
                    <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
                </div>
            </div>
        </lightning:button>

</aura:component>

and the associated style :
 
.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;
}

.THIS.innertile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS.lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

.THIS.selected {
    border: 3px solid rgb(0, 112, 210);
}

Any help would be great, I am a bit confused not to have this displayed correctly.

Thanks lot ! 
hello,

I have just installed the forceide2 and wehn I try to create a new SFDX project I get the following error :

User-added image

User-added image

Could you please help me figure this out ?

Thanks a lot for your help.
Hi,
I am trying to complete the challenge Lightning Data Service Basics - Manipulate Records with force:recordData and I am getting the followling error on the 'accEdit' component when I try it:
 
Problem saving record, error: [{"fieldErrors":{},"pageErrors":[]}]

Here is my code
accEdit.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId"> <!--inherit recordId attribute-->

<aura:attribute name="accountRecord" type="Object" />
<aura:attribute name="simpleRecord" type="Object" />
<aura:attribute name="recordError" type="String" />

<force:recordData aura:id="AccountRecordCreator"
	fields="Name"
    recordId="{!v.recordId}"
    targetError="{!v.recordError}"
    targetRecord="{!v.accountRecord}"
    targetFields="{!v.simpleRecord}"
    mode="EDIT" />
    
    <!-- Display an editing form -->
    <ui:outputText value="Edit Account"/>
    <lightning:input aura:id="recordName" name="recordName" label="Account Name"
                  value="{!v.accountRecord.Name}" required="true"/>
    <ui:button label="Save Account" press="{!c.handleSaveRecord}" class="slds-m-top--medium"/>
</aura:component>

accEditController.js
({
    handleSaveRecord: function(component, event, helper) {
        component.find("AccountRecordCreator").saveRecord($A.getCallback(function(saveResult) {
            if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                console.log("Save completed successfully.");
            } else if (saveResult.state === "INCOMPLETE") {
                console.log("User is offline, device doesn't support drafts.");
            } else if (saveResult.state === "ERROR") {
                console.log('Problem saving record, error: ' + JSON.stringify(saveResult.error));
            } else {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            }
        }))
        ;}
})

Could you please help me ?
I am stuck with that for hours...

Thanks a lot.


 
Hi,
I am trying to complete the challenge Lightning Data Service Basics - Manipulate Records with force:recordData and I am getting the followling error:
Challenge Not yet complete... here's what's wrong:
Could not find either the 'accEdit' component, 'accDisplay' component or both components in the Account Record Page.
This is strange because the 2 components are indeed on the page:
User-added image
Could please assist ?
Thanks for your help.
 
Hi,
I am following the Trailhead module  Lightning Data Service Basics, at the Creating Records step when trying to create a new record I am getting the followinh error:
 
TypeError: Action failed: force:record$controller$getNewRecord [type error on parameter callback: expected Function, found boolean]
Callback failed: serviceComponent://ui.flexipage.components.page.FlexipageController/ACTION$getPage
Here is my code
ldsNewRecord.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">

<aura:attribute name="newContact" type="Object"/>
<aura:attribute name="simpleNewContact" type="Object"/>
<aura:attribute name="newContactError" type="String"/>

<force:recordData aura:id="contactRecordCreator"
    layoutType="FULL"
    targetRecord="{!v.newContact}"
    targetFields="{!v.simpleNewContact}"
    targetError="{!v.newContactError}"
    />

<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

    <!-- Display a header -->
    <div class="slds-page-header" role="banner">
        <p class="slds-text-heading--label">Create Contact</p>
    </div>

    <!-- Display Lightning Data Service errors -->
    <aura:if isTrue="{!not(empty(v.newContactError))}">
        <div class="recordError">
            <ui:message title="Error" severity="error" closable="true">
                {!v.newContactError}
            </ui:message>
        </div>
    </aura:if>

    <!-- Display the new contact form -->
    <div class="slds-form--stacked">
        <lightning:input aura:id="contactField" name="firstName" label="First Name"
                         value="{!v.simpleNewContact.FirstName}" required="true"/>
      
        <lightning:input aura:id="contactField" name="lastname" label="Last Name"
                      value="{!v.simpleNewContact.LastName}" required="true"/>
                
        <lightning:input aura:id="contactField" name="title" label="Title"
                      value="{!v.simpleNewContact.Title}" />
                      
        <lightning:button label="Save contact" onclick="{!c.handleSaveContact}"
                   variant="brand" class="slds-m-top--medium"/>
   </div>

</aura:component>
ldsNewRecordController.js
({
    doInit: function(component, event, helper) {
        // Prepare a new record from template
        component.find("contactRecordCreator").getNewRecord(
            "Contact", // sObject type (entityAPIName)
            null,      // recordTypeId
            false,     // skip cache?
            $A.getCallback(function() {
                var rec = component.get("v.newContact");
                var error = component.get("v.newContactError");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                }
                else {
                    console.log("Record template initialized: " + rec.sobjectType);
                }
            })
        );
    },

    handleSaveContact: function(component, event, helper) {
        if(helper.validateContactForm(component)) {
            component.set("v.simpleNewContact.AccountId", component.get("v.recordId"));
            component.find("contactRecordCreator").saveRecord(function(saveResult) {
                if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                    // record is saved successfully
                    var resultsToast = $A.get("e.force:showToast");
                    resultsToast.setParams({
                        "title": "Saved",
                        "message": "The record was saved."
                    });
                    resultsToast.fire();

                } else if (saveResult.state === "INCOMPLETE") {
                    // handle the incomplete state
                    console.log("User is offline, device doesn't support drafts.");
                } else if (saveResult.state === "ERROR") {
                    // handle the error state
                    console.log('Problem saving contact, error: ' + 
                                 JSON.stringify(saveResult.error));
                } else {
                    console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
                }
            });
        }
    }
})
Could please assist ?
Thanks for your help.


 
Hello,

I am currently going though the trailhead module Build an Instant Notification App at the step Subscribe to a Platform Event

I have Verified this step but when I click Broadcast bear warning button, nothing is diplayed in my Salesforce org.
I have tried to refresh the page and even to clear the cache.

Here is my code :
NotificationConsole.cmp
<aura:component controller="NotificationController" implements="flexipage:availableForAllPageTypes" access="global">
		
    <ltng:require scripts="{!$Resource.cometd}" afterScriptsLoaded="{!c.onCometdLoaded}"/>
    
    <aura:attribute name="sessionId" type="String"/>
    <aura:attribute name="cometd" type="Object"/>
    <aura:attribute name="cometdSubscriptions" type="Object[]"/>
    
  <aura:attribute name="notifications" type="Object[]"/>
  <aura:attribute name="isMuted" type="Boolean" default="false"/>

  <aura:handler name="init" value="{!this}" action="{!c.onInit}"/>

  <aura:registerEvent name="toastEvent" type="force:showToast"/>


  <div class="container">

    <!-- Header -->
    <div class="slds-p-around--x-small slds-border--bottom slds-theme--shade">
      <div class="slds-grid slds-grid--align-spread slds-grid--vertical-align-center">
        <div>
          <span class="slds-badge">{!v.notifications.length}</span>
        </div>
        <div>
          <lightning:buttonIcon onclick="{!c.onClear}" iconName="utility:delete" title="Clear notifications"
            alternativeText="Clear notifications" variant="border-filled"/>
          <lightning:buttonIcon onclick="{!c.onToggleMute}"
            iconName="{!v.isMuted ? 'utility:volume_off' : 'utility:volume_high'}"
            title="{!v.isMuted ? 'Unmute notifications' : 'Mute notifications'}"
            alternativeText="Toggle mute" variant="border-filled"/>
        </div>
      </div>
    </div>

    <!-- Notification list -->
    <div class="slds-container--fluid slds-scrollable--y content">
      <aura:iteration items="{!v.notifications}" var="notification">
        <div class="slds-p-around--small slds-border--top">
          <div class="slds-grid slds-grid--align-spread slds-has-flexi-truncate">
            <p>{!notification.message}</p>
            <p class="slds-text-color--weak slds-p-left--x-small">{!notification.time}</p>
          </div>
        </div>
      </aura:iteration>
    </div>

  </div>

</aura:component>

NotificationConsoleController.js
({
  
  onCometdLoaded : function(component, event, helper) {
  var cometd = new org.cometd.CometD();
  component.set('v.cometd', cometd);
  if (component.get('v.sessionId') != null)
    helper.connectCometd(component);
},  
    
  onInit : function(component, event, helper) {
  component.set('v.cometdSubscriptions', []);
  component.set('v.notifications', []);

  // Disconnect CometD when leaving page
  window.addEventListener('unload', function(event) {
    helper.disconnectCometd(component);
  });

  // Retrieve session id
  var action = component.get('c.getSessionId');
  action.setCallback(this, function(response) {
    if (component.isValid() && response.getState() === 'SUCCESS') {
      component.set('v.sessionId', response.getReturnValue());
      if (component.get('v.cometd') != null)
        helper.connectCometd(component);
    }
    else
      console.error(response);
  });
  $A.enqueueAction(action);

  helper.displayToast(component, 'success', 'Ready to receive notifications.');
},
    
  onClear : function(component, event, helper) {
    component.set('v.notifications', []);
    },

  onToggleMute : function(component, event, helper) {
    var isMuted = component.get('v.isMuted');
    component.set('v.isMuted', !isMuted);
    helper.displayToast(component, 'success', 'Notifications '+ ((!isMuted) ? 'muted' : 'unmuted') +'.');
    }
})

notificationConsoleHelper.js
({
  connectCometd : function(component) {
    var helper = this;

    // Configure CometD
    var cometdUrl = window.location.protocol+'//'+window.location.hostname+'/cometd/40.0/';
    var cometd = component.get('v.cometd');
    cometd.configure({
      url: cometdUrl,
      requestHeaders: { Authorization: 'OAuth '+ component.get('v.sessionId')},
      appendMessageTypeToURL : false
    });
    cometd.websocketEnabled = false;

    // Establish CometD connection
    console.log('Connecting to CometD: '+ cometdUrl);
    cometd.handshake(function(handshakeReply) {
      if (handshakeReply.successful) {
        console.log('Connected to CometD.');
        // Subscribe to platform event
        var newSubscription = cometd.subscribe('/event/Notification__e',
          function(platformEvent) {
            console.log('Platform event received: '+ JSON.stringify(platformEvent));
            helper.onReceiveNotification(component, platformEvent);
          }
        );
        // Save subscription for later
        var subscriptions = component.get('v.cometdSubscriptions');
        subscriptions.push(newSubscription);
        component.set('v.cometdSubscriptions', subscriptions);
      }
      else
        console.error('Failed to connected to CometD.');
    });
      },

  disconnectCometd : function(component) {
    var cometd = component.get('v.cometd');

    // Unsuscribe all CometD subscriptions
    cometd.batch(function() {
      var subscriptions = component.get('v.cometdSubscriptions');
      subscriptions.forEach(function (subscription) {
        cometd.unsubscribe(subscription);
      });
    });
    component.set('v.cometdSubscriptions', []);

    // Disconnect CometD
    cometd.disconnect();
    console.log('CometD disconnected.');
  },

  onReceiveNotification : function(component, platformEvent) {
    var helper = this;
    // Extract notification from platform event
    var newNotification = {
      time : $A.localizationService.formatDateTime(
        platformEvent.data.payload.CreatedDate, 'HH:mm'),
      message : platformEvent.data.payload.Message__c
    };
    // Save notification in history
    var notifications = component.get('v.notifications');
    notifications.push(newNotification);
    component.set('v.notifications', notifications);
    // Display notification in a toast if not muted
    if (!component.get('v.isMuted'))
      helper.displayToast(component, 'info', newNotification.message);
  },

  displayToast : function(component, type, message) {
    var toastEvent = $A.get('e.force:showToast');
    toastEvent.setParams({
      type: type,
      message: message
    });
    toastEvent.fire();
  }
})

Could you please advise ? This is a very nice feature and would very much like to have working.
Thanks for your help.
 
Hi,

I am trying to test image recognition to the Cat objet in the Trailhead module Build a Cat Rescue App That Recognizes Cat Breeds and I am get get the following errors :

User-added image

User-added image

Could you please advise ? I can't wait to test this with other images !

Thanks for your help.
Hi,

I am stuck at the Create and Train the Dataset step on the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead module.

I have successfully created the lightning component, uploaded the zip file and clicked on the train button but when I try to Verifiy I get the following error message:
"Challenge Not yet complete... here's what's wrong: 
Could not find a successful cat dataset training. The training may take a couple of minutes after the model is created."

Could you please advise ?

Thanks for your help.
Hello,

I am trying to complete the Module Workflow Rule Migration Map and at stage Your Workflow Criteria to Process Criteria, when I try to validate the challenge I got the following error :

Challenge Not yet complete... here's what's wrong: 
A process called 'Opportunity Management' doesn't exist. Check the process’s label and API name. Make sure that the process starts when a record changes.

I ho have created a process builder named Opportunity Management with Api name Opportunity_Maangement that starts when a record change.

Could you please advise ?
Thanks a lot.
Hello,
I'm following the Trailhead module "Build a 3D Virtual Reality", at the step "App Add VR", I am getting the error message:
controlGvrPointerInputModule requires GvrPointerManager.Pointer to be set.
After searching the web, it seams like the module has been built using Google VR SDK 1.1 and the current version is 1.2 and that there has been some changes.
Looks like I need to use GrvEventSytem instead of EventSytem.
I tried it, not more error message is shown but I still can't manage to login, the clicks are no longer detected.

Could somebody please assist ?

Thanks a lot.
 
Hello,

I am trying to write a test for a trigger that is firing a future apex callout and I get this error:
Methods defined as TestMethod do not support Web service callouts
The trigger calls the callBillingService method from this class:
public class BillingCalloutService {
    //Implement business and callout logic methods here
    @Future(callout=true)
    public static void callBillingService(List<Id> recordIds) {
        List<Project__c> projects = [Select Id, ProjectRef__c,Billable_Amount__c from Project__c Where Id = :recordIds];

        List<Project__c> projectsToUpdate = new List<Project__c>();

        String username = ServiceCredentials__c.getValues('BillingServiceCredential').Username__c;
        String password = ServiceCredentials__c.getValues('BillingServiceCredential').Password__c;

        String auth = username + ':' + password;
        String encodedAuth = EncodingUtil.base64Encode(Blob.valueOf(auth));

        for(Project__c p : projects) {

            BillingServiceProxy.InvoicesPortSoap11 service = new BillingServiceProxy.InvoicesPortSoap11();
            service.inputHttpHeaders_x = new Map<String, String>();
            service.inputHttpHeaders_x.put('Authorization', 'Basic ' + encodedAuth);

            BillingServiceProxy.project project = new BillingServiceProxy.project();
            project.username = username;
            project.password = password;
            project.projectRef = p.ProjectRef__c;
            project.billAmount = p.Billable_Amount__c;

            if(service.billProject(project).equals('ok')){
                projectsToUpdate.add(new Project__c(ProjectRef__c = p.ProjectRef__c, Status__c = 'Billed'));
            }
        }
        shouldIRun.stopTrigger();
        upsert projectsToUpdate ProjectRef__c;
    }
}
here is the test class:
 
@IsTest
private class BillingCalloutServiceTest {

    @IsTest
    private static void testBillingCalloutService() {
    Account a = new Account(Name = 'Acme');
    insert a;
    Opportunity o = new Opportunity(Name='Test', StageName='Submitted Project', AccountId=a.Id, Amount=1000, CloseDate=Date.Today());
    insert o;
    Project__c p = new Project__c(Status__c='Running',Start_Date__c=Date.Today(),End_Date__c=Date.Today(),Billable_Amount__c=10000,ProjectRef__c='projectX',Opportunity__c=o.Id);
    insert p;

    insert new ServiceCredentials__c(Name='BillingServiceCredential',Username__c='toto', Password__c='azerty');

    Test.startTest();
    Test.setMock(HttpCalloutMock.class, new BillingCalloutServiceMock());
      p.Status__c = 'Billable';
      update p;
    Test.stopTest();
    // runs callout and check results
    p = [select Status__c from Project__c where id =: p.id];
    System.assertEquals('Billed', p.Status__c);
    }

}

Could you please advise ?

Thanks a lot.
 
I am trying to test an HttpCallout using mocks and I get the following error :
 
System.TypeException: Supplied type is not an interface
Stack Trace	Class.System.Test.setMock: line 57, column 1
Class.ProjectCalloutServiceTest.testBillingCalloutService: line 15, column 1
 
@IsTest
private class ProjectCalloutServiceTest {

    @IsTest
    private static void testBillingCalloutService() {
        
        Account a = new Account(Name = 'Acme');
        insert a;
        Opportunity o = new Opportunity(Name='Test', StageName='Submitted Project', AccountId=a.Id, Amount=1000, CloseDate=Date.Today());
        insert o;
        
        List<Id> oppList = new List<Id>();
        oppList.add(o.Id);
  
        Test.setMock(ProjectCalloutServiceMock.class, new ProjectCalloutServiceMock());
        Test.startTest();
            ProjectCalloutService.postOpportunityToPMS(oppList);
        Test.stopTest();
        // runs callout and check results
        o = [select StageName from Opportunity where id =: o.Id];
        System.assertEquals('Submitted Project', o.StageName);
  }
 
isTest
global class ProjectCalloutServiceMock implements HttpCalloutMock {
    global HttpResponse respond(HttpRequest req) {
        // Create a fake response
        HttpResponse res = new HttpResponse();
        res.setHeader('Content-Type', 'application/json');
        res.setBody('{"status":"success"}');
        res.setStatusCode(200);
        return res; 
    }
}

I can't find any documentation on this error and what is causing that, could you please advise ?

Thanks a lot.
Hello there,

I'm currently having a styling issue at the the step 3 of the Trailhead Lightning Component Framework Specialist,

here is what it's currently looks like :

User-added image

and what it is supposed to look :

User-added image

This is the BoatTile component code :
 
<aura:component >

    <aura:attribute name="boat" type="Boat__c" />
    <aura:attribute name="selected" type="Boolean" default="false" />
    
    <aura:registerEvent name="BoatSelect" type="c:BoatSelect"/>
    <aura:registerEvent name="BoatSelected" type="c:BoatSelected"/>

        <lightning:button class="{! v.selected == true ? 'tile selected' : 'tile' }" onclick="{!c.onBoatClick}">
            <div style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}" class="innertile">
                <div class="lower-third">
                    <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
                </div>
            </div>
        </lightning:button>

</aura:component>

and the associated style :
 
.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;
}

.THIS.innertile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS.lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

.THIS.selected {
    border: 3px solid rgb(0, 112, 210);
}

Any help would be great, I am a bit confused not to have this displayed correctly.

Thanks lot ! 
Hello,

Is there a way to opt out from Salesforce developer forum emails ?
Every time somebody responds to a topic I have participated to, I get a notification email.
This is kind of boring, especially for topic I have resolved a long time ago.

Thanks for your help!
Hello,

Did someone managed to pass the third step of the "Empower Your Salesforce Users" badge ?
It has been added recently and it is keeping on falling with the error  :

"Challenge not yet complete in My Trailhead Playground
We couldn't find a question with display logic. Make sure one of your questions has display logic."

And I do have a display logic working on the "Tell us what didn’t go well with the installation" question :

User-added image
Thanks for the help !
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 Devs! 


I'm a new adventurer in Salesforce and I don't have so much knowledge in developing. So I'm learning about Einstein Analytics and it is my first Superbadge in Trailhead.
I did the previous requires perfectly, like upload files and organize my org, so my question is:
- The first challenge says to do a graph that shows a churn rate (like a image below), but I cannot undertand how to do this formula. I need to do this using SAQL? Can you help me showing how I proceed to do this graph?

Thanks for help! I'm beginner in Salesforce World and I need to get knowledge in this great software!
Formula
Hi Admins and Developers! What's up?


I'm learning Einstein Analytics and it is my first Superbadge, so I've some questions about it:
1) This first step we need to create a chart that show churn rate from quarter, I'm lost in 5º step, I really don't know how to do this requires to this chart. 

I'm grateful for help!

User-added image
 
Hello there,

I'm playing with the new lightning:map component and I'm trying to use a query to get account locations on the map.
I am currently experimenting this error : "render threw an error in 'lightning:map' [Cannot read property 'length' of null]"

Here is my code :
map component :
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="AccountLocation">

        <!-- attributes -->
        <aura:attribute name="mapMarkers" type="Object"/>
        <aura:attribute name="zoomLevel" type="Integer" />
    
        <!-- handlers-->
        <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    
        <!-- the map component -->
        <lightning:map 
            mapMarkers="{! v.mapMarkers }" 
            zoomLevel="{!v.zoomLevel}" />
    
</aura:component>

controller :
({   
     init: function (component, event, helper) {
        var action = component.get("c.getAccount");
        action.setCallback(this, function(response) {
            console.log('response'+response);
            var state = response.getState();
            console.log(state);
            if (state == "SUCCESS") {
                var obj =response.getReturnValue() ;
                console.log(obj);
                
                component.set('v.mapMarkers', obj);
                component.set('v.zoomLevel', 4);
            }
            
        });
        $A.enqueueAction(action); 
    }
    
})

apex controller:
public class AccountLocation {
    @AuraEnabled
    public static List<Location> getAccount() {
        List< Account> accs =  [Select Id, Name,Type, Industry, BillingAddress,BillingStreet,
                                BillingCity, BillingCountry, BillingPostalCode,
                                Phone From Account where BillingCountry = 'France'] ;
        
        List<Location> loc = new List<Location>();
        for(Account acc :accs){
            GeoLocation geoInfo = new GeoLocation();
            geoInfo.Street = acc.BillingStreet;
            geoInfo.PostalCode = acc.BillingPostalCode;
            geoInfo.City = acc.BillingCity;
            geoInfo.Country = acc.BillingCountry;
            Location locDetail = new Location();
            locDetail.icon = 'standard:account'; 
            locDetail.title = acc.Name;
            locDetail.description = acc.Name;
            locDetail.location = geoInfo;
            
            loc.add(locDetail);
        }
        return loc ;
    }
    public class Location{
        @AuraEnabled 
        public String icon{get;set;} 
        @AuraEnabled 
        public String title{get;set;} 
        @AuraEnabled
        public String description{get;set;} 
        @AuraEnabled 
        public GeoLocation location{get;set;} 
    }
    public class GeoLocation{
        @AuraEnabled 
        public String Street{get;set;}
        @AuraEnabled 
        public String PostalCode{get;set;}
        @AuraEnabled 
        public String City{get;set;}
        @AuraEnabled 
        public String Country{get;set;}
    }
}

Thanks for your help !
Hi there,

I'm having an issue with the newly released Share CRM Data with Your Partners trailhead module, in the Create a Partner Portal and Partner Users challenge I get the following error :

User-added image

I do have created a community called Ursa Major :
User-added image

Could you please assist ?
Thanks a lot !
 
Hello all,

I followed the directions in the Trailhead module and clicked https://localhost:8443. I received the below error.

This site can’t be reached
localhost refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

I have internet connection, there is no proxy, and I turned off the firewall. I saw documentation that suggested checking for missing "listen:443". I found it in the nginx.conf file. Any help would be appreciated. Thank you.
Hi there,

I'm facing an issue at the step 3 of the Advanced Apex Superbadge, on the Product2New page the List Price is not editable :

User-added image

In the Visualforce page I'm using :
<apex:column headerValue="{!$ObjectType.PriceBookEntry.fields.UnitPrice.label}" >
    <inputField value="{!p.pricebookEntryRecord.UnitPrice}" />
</apex:column>
and in the controller extension class Product2Extension, here is my wrapper :
public class ProductWrapper {
        public Product2 productRecord {get; set;}
        public PriceBookEntry pricebookEntryRecord {get; set;}
        
        public productWrapper() {
            productRecord = new product2(Initial_Inventory__c = 0);
            pricebookEntryRecord = new pricebookEntry();
        }
}
Any piece of advice to get this working ?

Thanks a lot !


 
Hello there,

I'm currently having a styling issue at the the step 3 of the Trailhead Lightning Component Framework Specialist,

here is what it's currently looks like :

User-added image

and what it is supposed to look :

User-added image

This is the BoatTile component code :
 
<aura:component >

    <aura:attribute name="boat" type="Boat__c" />
    <aura:attribute name="selected" type="Boolean" default="false" />
    
    <aura:registerEvent name="BoatSelect" type="c:BoatSelect"/>
    <aura:registerEvent name="BoatSelected" type="c:BoatSelected"/>

        <lightning:button class="{! v.selected == true ? 'tile selected' : 'tile' }" onclick="{!c.onBoatClick}">
            <div style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}" class="innertile">
                <div class="lower-third">
                    <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
                </div>
            </div>
        </lightning:button>

</aura:component>

and the associated style :
 
.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;
}

.THIS.innertile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS.lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

.THIS.selected {
    border: 3px solid rgb(0, 112, 210);
}

Any help would be great, I am a bit confused not to have this displayed correctly.

Thanks lot ! 
Hi All,

While working on the Advanced Apex Specialist Superbadge Step 7 I am facing a weird issue.
User-added image

The OrderExtension class is alreeady containing a variable of StandardSetController and in the OrderEdit page orderItemList is getting iterated.
But Salesforce doesn't support standardsetcontroller for OrderItem.

Hence getting the error: List controllers are not supported for OrderItem

Could anyone please help me, how to solve this issue.

Thanks,
I am getting below error
User-added image

but my application has 
User-added image

May I know why am not able to pass this challenge ?
 
In this step you're supposed to create a Lightning App for Poloma that contains only the things she wants to focus on.  So I did, I created a Lightning App called Communications, added the Home, Account, Chatter, Reports, and Dashboards tabs, then assigned it to her profile as the default app.

All I get is an error.  "Didn't find a Lightning app named Communications. This Lightning app must include the items that Paloma uses regularly. Paloma must be able to access the app."

Which is completely misleading because the app does exist.  I even logged in a Poloma and checked she could see the app, and everything looked good.  I'm at a complete loss.

Can anyone give any pointers or hints?  I've tried removing the Home tab and checking the step, but I get the same error.  I tried adding in the Key Sales Data page, same error.  Both the home and Key Sales Data, same error.  I tried duplicating the Sales app tabs but reordering them and including what Poloma wants, but still I get an error.

 
In this step you're supposed to create a Lightning App for Poloma that contains only the things she wants to focus on.  So I did, I created a Lightning App called Communications, added the Home, Account, Chatter, Reports, and Dashboards tabs, then assigned it to her profile as the default app.

All I get is an error.  "Didn't find a Lightning app named Communications. This Lightning app must include the items that Paloma uses regularly. Paloma must be able to access the app."

Which is completely misleading because the app does exist.  I even logged in a Poloma and checked she could see the app, and everything looked good.  I'm at a complete loss.

Can anyone give any pointers or hints?  I've tried removing the Home tab and checking the step, but I get the same error.  I tried adding in the Key Sales Data page, same error.  Both the home and Key Sales Data, same error.  I tried duplicating the Sales app tabs but reordering them and including what Poloma wants, but still I get an error.