• M Parnell
  • NEWBIE
  • 39 Points
  • Member since 2015
  • Applications Support Administrator
  • Pana-Pacific


  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 23
    Replies

Exercise/Challenge -  Add Branding and Components to the Community

In the section Updating the Headline, no matter which web browser I use, the Community Builder page doesn't allow for the selection of any components. Instead it's just the 6 blue dots in the middle as if the page was trying to load something.

Has anyone ever had this issue with this trail exercise?

Screenshot of display when trying to add components.

Challenge Not yet complete... here's what's wrong:
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: RPNJLOPG

My org is a brand new dev org, separate from the Trailhead plaground I was using beforehand.
Any thoughts?
I keep receiving the following error message when attempting to clear:

"Challenge Not yet complete... here's what's wrong:  Could not find notification on dashboard. Please check the requirements again." 
(Task - Create a notification to alert you when lost opportunities exceed a certain amount)


The alert is created and set to run. When you Save and Run the alert, it disables it for some reason and you can't see it as a widget in  the Notification Tracking section. When you Save only, it stays active and displays the widget on the Wave Analytics home page. It doesn't display on the Oppty Details dashboard though.

Any thoughts? I'd like to complete this trail and progress to the next part of the project.

Each time I attempt to execute using Workbench, it tells me my SessionID cannot be found.
Attached is the screenshot of my setup before clicking "Execute".
I've gone through and performed the steps a few times to verify each one, and my Session ID isn't changing, so I'm curious as to why it's not finding my Session ID.


Setup screen for the Get Session ID portion of API Basic Trailhead Module

In this superbadge, for Step 2, it says to run the Apex test 'BeAwesome'.
I receive the message that the class needs to be defined as Global, but the packages aren't meant to be modified() according to their directions).
Looking for any assistance with this particular Superbadge.
Result after running the Apex test

User-added image
I've completed the steps, and the record was created via the Heroku app I created in the exercise.

Initially, I received this error when creating the record manually, and that I understood.
Now that Heroku connected, my app is working, and the record is created, I'm not understanding which part I'm misisng.

I'm still getting the following error:
User-added image
@AuraEnabled
public static List<Contact> getContacts() {
    return [Select Id, Name, Email, Title, Phone From Contact];
}
I'm receiving the following error: unexpected token: 'List'
 
User-added image

When testing my process, it performs as expected, but I still receive an error that it didn't work. I've gone through the steps 3 times, and I'm not seeing what I've missed.
global class SendReminderEmail implements Database.Batchable<sObject>{
	global String query;
	global String subject;
	global String body;	
}
	global SendReminderEmail(String query, String subject, String body){ 
		this.query = query;
    	this.subject = subject;
    	this.body = body;
}

    global Database.QueryLocator start(Database.BatchableContext bc) {
		return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext bc, List<Speaker__c> scope) {
    for (Speaker__c speaker : scope) {
        EmailManager.sendMail(speaker.Email__c, this.subject, this.body);
    }
}

    global void finish(Database.BatchableContext bc) {

    }
In Step 4 of this project exercise, the constructor global SendReminderEmail(String query, String subject, String body) is throwing an error that 'global' is an unexpected token. My complete code is featured above.
 
Step 6: For the Error Condition Formula, you want to prevent the record from being saved for an Exhaust Port Inspector with a utilization of less than 150%. Enter the formula as AND(Name = "Exhaust Port Inspector", Utilization__c < 1.5).

I created the formula but receive the following error:
Step Not yet complete... here's what's wrong:
The validation rule does not appear to have the correct error formula. Make sure Exhaust Port Inspectors have > 150% utilization'
Note: you may run into errors if you've skipped previous steps.


So I changed the formual to the following: AND(Name="Exhaust Port Inspector", Utilization__c>1.5), but still receive the same error message.
 
Step 2 - Extend the Data Model
Part 3 - Create picture field
IMAGE(Picture_Path__c,") doesn't work as a formula.
Result: Error: Syntax error. Missing "
When attempting to create my Apex trigger for this Trailhead development exercise, I receive an error. I don't understand how this is possible, because the records haven't been updated, and still aren't updating.
"Challenge not yet complete... here's what's wrong:
Setting 'Match_Billing_Address__c' to false updated the records anyway. The trigger should only act when Match_Billing_Address__c is true."


Here's my code:
trigger AccountAddressTrigger on Account (before insert, before update) {

    for(Account a : Trigger.new){
        If (a.Match_Billing_Address__c = true) {
            a.ShippingPostalCode = a.BillingPostalCode;
        }   
    }

}


 
I keep receiving the following error message when attempting to clear:

"Challenge Not yet complete... here's what's wrong:  Could not find notification on dashboard. Please check the requirements again." 
(Task - Create a notification to alert you when lost opportunities exceed a certain amount)


The alert is created and set to run. When you Save and Run the alert, it disables it for some reason and you can't see it as a widget in  the Notification Tracking section. When you Save only, it stays active and displays the widget on the Wave Analytics home page. It doesn't display on the Oppty Details dashboard though.

Any thoughts? I'd like to complete this trail and progress to the next part of the project.
@AuraEnabled
public static List<Contact> getContacts() {
    return [Select Id, Name, Email, Title, Phone From Contact];
}
I'm receiving the following error: unexpected token: 'List'
 
When attempting to create my Apex trigger for this Trailhead development exercise, I receive an error. I don't understand how this is possible, because the records haven't been updated, and still aren't updating.
"Challenge not yet complete... here's what's wrong:
Setting 'Match_Billing_Address__c' to false updated the records anyway. The trigger should only act when Match_Billing_Address__c is true."


Here's my code:
trigger AccountAddressTrigger on Account (before insert, before update) {

    for(Account a : Trigger.new){
        If (a.Match_Billing_Address__c = true) {
            a.ShippingPostalCode = a.BillingPostalCode;
        }   
    }

}


 
Hi Can some one explain me how to use two components with Lightning Data Service, i tried the following code for accDisplay and accEdit.
This worked as i expected but i got the following error!

I am missing some thing, can some one explain me how LDS works with multiple componets!
 
Challenge Not yet complete... here's what's wrong: 
The 'accDisplay' Lightning Component does not appear to be displaying the 'Name' using 'ui:outputText' and the value 'v.accountRecord.Name
 
<!--accDisplay component-->
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
 <aura:attribute name="accountRecord" type="Object" />
<force:recordData aura:id="AccountRecordCreator"
    recordId="{!v.recordId}"
    layoutType="FULL"
    targetRecord="{!v.accountRecord}"
    targetFields="{!v.simpleNewAccount}"
    targetError="{!v.newContactError}"
                  mode="VIEW"
    />
   



    <!-- Display a header with details about the record -->
    <div class="slds-form--stacked">
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="recordName">Name: </label>
            <div class="slds-form-element__control">
              <ui:outputText class="slds-input" aura:id="recordName"
                value="{!v.simpleNewAccount.Name}" />
            </div>
            <label class="slds-form-element__label" for="recordIndustry">Industry: </label>
            <div class="slds-form-element__control">
              <ui:outputText class="slds-input" aura:id="recordIndustry"
                value="{!v.simpleNewAccount.Industry}" />
            </div>
             <label class="slds-form-element__label" for="recordDescription">Description: </label>
            <div class="slds-form-element__control">
              <ui:outputTextArea class="slds-input" aura:id="recordDescription"
                value="{!v.simpleNewAccount.Description}" />
            </div>
             <label class="slds-form-element__label" for="recordPhone">Phone: </label>
            <div class="slds-form-element__control">
              <ui:outputPhone class="slds-input" aura:id="recordPhone"
                value="{!v.simpleNewAccount.Phone}" />
            </div>
        </div>
    </div>

   

   
</aura:component>
<!--accEdit-->
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">

<aura:attribute name="accountRecord" type="Object"/>
<aura:attribute name="simpleNewAccount" type="Object"/>
<aura:attribute name="newContactError" type="String"/>

<force:recordData aura:id="AccountRecordCreator"
    recordId="{!v.recordId}"
    layoutType="FULL"
    targetRecord="{!v.accountRecord}"
    targetFields="{!v.simpleNewAccount}"
    targetError="{!v.newContactError}"
                  mode="EDIT"
    />
   
    <ui:outputText class="slds-output" 
                value="Edit Account" />
     <lightning:input aura:id="recordName" name="accountRecord" label="Name"
                  value="{!v.simpleNewAccount.Name}" />

     <lightning:button label="Save Account" onclick="{!c.handleSaveRecord}"
               variant="brand" class="slds-m-top--medium"/>
</aura:component>

 
The challenge is to search for the inserted record with an inline SOSL search, using Execute Anonymous.

This is what I did using Execute Anonymous Window
 
List<List<sObject>> searchList = [FIND 'Mission Control' IN ALL FIELDS 
                                  RETURNING Contact(FirstName, LastName,
                                  Phone, Email, Description)];
Contact[] searchContacts = (Contact[])searchList[0];
System.debug('Found the following contacts:');
for (Contact c : searchContacts) {
   System.debug('"'+c.LastName + ', ' + c.FirstName+'"');
}

But still there's an error when I check the challenge.

Challenge Not yet complete... here's what's wrong: 
Could not find the contact's name in the debug log. Be sure to run a query for your record, and to write your contact's name to the debug log using the System.debug() method.

Each time I attempt to execute using Workbench, it tells me my SessionID cannot be found.
Attached is the screenshot of my setup before clicking "Execute".
I've gone through and performed the steps a few times to verify each one, and my Session ID isn't changing, so I'm curious as to why it's not finding my Session ID.


Setup screen for the Get Session ID portion of API Basic Trailhead Module

Hi All,
I am trying to do Trailhead module about Heroku Connect module 
The application's server.js file in the root directory contains the server-side Node.js application. If you edit that file, you see the SQL statement used to update the database:UPDATE salesforce.Contact SET Phone = $1, MobilePhone = $1 WHERE ...
I couldn't find any such file containing the UPDATE salesforce.Contact SET Phone = $1, MobilePhone = $1 WHERE ... 
 please help
Hi all,

I have a problem with this challenge : 

Write an Apex trigger that fires before records are inserted and ensures that the ShippingState field has the same value as the BillingState field.
Create an Apex class named AccountTriggerHandler that contains a public static method called CreateAccounts to accept the List of Account objects.
For each Account record, before saving, ensure that the ShippingState field has the same value as the BillingState field.
Write an Apex trigger named AccountTrigger that fires before records are inserted.
The Apex trigger must call the AccountTriggerHandler.CreateAccounts() method with the collection of new records.
Create a test class named AccountTriggerTest that inserts 200 Account records with a BillingState of CA. After the insert, test to ensure that all 200 records have a ShippingState of CA.
Before verifying this challenge, run your test class at least once using the Developer Console Run All feature.

and this is my classes :
 
public class AccountTriggerHandler {
    
    public static void CreateAccounts(List<Account> acclist){
        
        
        for(Account a:acclist){
            
            if(a.ShippingState!=a.BillingState){
                a.BillingState=a.ShippingState;
              
            }
        }
    }

}
 
trigger AccountTrigger on Account (before insert) 
{
    if (Trigger.isBefore && Trigger.isInsert) {
			AccountTriggerHandler.CreateAccounts(Trigger.new);
		}	
	}
 
@isTest
public class AccountTriggerTest {
    
    @isTest static void TestCreate200Records(){
        
        // Test Setup data
        // Create 200 new Accounts
        List<Account> accts = new List<Account>();
        for(Integer i=0; i < 200; i++) {
            Account acct = new Account(Name='Test Account ' + i, BillingState = 'CA');
            accts.add(acct);
        
            Test.startTest();
            //insert acct;
        	Test.stopTest();
            
            for (Account a:accts){
                
                System.assertEquals('CA', a.ShippingState, 'ERROR');
            }
            
    }

        
}
}
And this error :
Challenge Not yet complete... here's what's wrong: 
The 'AccountTrigger' Trigger does not appear to be working correctly. Inserted records did not have matching BillingState and ShippingState values.

Anyone can help me please??
Thanks!
 
@AuraEnabled
public static List<Contact> getContacts() {
    return [Select Id, Name, Email, Title, Phone From Contact];
}
I'm receiving the following error: unexpected token: 'List'
 
User-added image

When testing my process, it performs as expected, but I still receive an error that it didn't work. I've gone through the steps 3 times, and I'm not seeing what I've missed.
global class SendReminderEmail implements Database.Batchable<sObject>{
	global String query;
	global String subject;
	global String body;	
}
	global SendReminderEmail(String query, String subject, String body){ 
		this.query = query;
    	this.subject = subject;
    	this.body = body;
}

    global Database.QueryLocator start(Database.BatchableContext bc) {
		return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext bc, List<Speaker__c> scope) {
    for (Speaker__c speaker : scope) {
        EmailManager.sendMail(speaker.Email__c, this.subject, this.body);
    }
}

    global void finish(Database.BatchableContext bc) {

    }
In Step 4 of this project exercise, the constructor global SendReminderEmail(String query, String subject, String body) is throwing an error that 'global' is an unexpected token. My complete code is featured above.
 
global class LeadProcessor implements 
    Database.Batchable<Leads>, Database.Stateful {
//     Database.Batchable<Sobject>, Database.Stateful {

    
    // instance member to retain state across transactions
    global Integer recordsProcessed = 0;

    global Database.QueryLocator start(Database.BatchableContext bc) {
        return Database.getQueryLocator([Select LastName From Leads ]);

     }
          
    }

    global void execute(Database.BatchableContext bc, List<Leads> scope){
        // process each batch of records
        List<Leads> leads = new List<Leads>();
            for (Leads:leads) {
                Leads.LeadSource = Dreamforce;
                // add Leads to the list to be updated
                leads.add(leads);
                // increment the instance member counter
                recordsProcessed = recordsProcessed + 1;
            }
        }
        update leads;
    }    

    global void finish(Database.BatchableContext bc){
        System.debug(recordsProcessed + ' records processed. Shazam!');
        AsyncApexJob job = [SELECT Id, Status, NumberOfErrors, 
            JobItemsProcessed,
            TotalJobItems, CreatedBy.Email
            FROM AsyncApexJob
            WHERE Id = :bc.getJobId()];
        // call some utility to send email
        EmailUtils.sendMessage(a, recordsProcessed);
    }    

}
Step 6: For the Error Condition Formula, you want to prevent the record from being saved for an Exhaust Port Inspector with a utilization of less than 150%. Enter the formula as AND(Name = "Exhaust Port Inspector", Utilization__c < 1.5).

I created the formula but receive the following error:
Step Not yet complete... here's what's wrong:
The validation rule does not appear to have the correct error formula. Make sure Exhaust Port Inspectors have > 150% utilization'
Note: you may run into errors if you've skipped previous steps.


So I changed the formual to the following: AND(Name="Exhaust Port Inspector", Utilization__c>1.5), but still receive the same error message.
 
Step 2 - Extend the Data Model
Part 3 - Create picture field
IMAGE(Picture_Path__c,") doesn't work as a formula.
Result: Error: Syntax error. Missing "
Hi,
The trailhead project is title is something that I have completed and even data is correctly updated as provided in the module. Still the module doesnt show up as complete and results in error:

Step Not yet complete... here's what's wrong: 
The 'Tim Barr' contact record was not updated correctly in Salesforce. Please check your Heroku Connect setup. 
Note: you may run into errors if you've skipped previous steps.

I could clearly see that my change in updated heroku app traversed to SF Org and updated the required fields. But still I see below error.

Moulde URL:
https://developer.salesforce.com/trailhead/project/quickstart-heroku-connect/qs-heroku-connect-4

Hi everyone,

i'm getting the following error after the system checks the challenge:

"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject"

I already tested it via Apex and via REST Explorer in Workbench, the code seems fine to me:

@restResource(urlMapping='/Account/*/contacts')
global class AccountManager {
	
    @httpGet
    global static Account getAccount(){
        RestRequest request = RestContext.request;
        String accountId = request.requestURI.substringBetween('/Account/' , '/contacts');
        
        Account result = [SELECT Id, Name, (SELECT Id,Name FROM Contacts) FROM Account WHERE Id = :accountId];
  
        return result;

    }
    
}


Can somebody help me with this?

Thank you,
Fabio

I'm getting an error "No Apex class named 'AnimalLocatorMock' was found" when validating the challenge.  However, everything seems to be coded correctly, and I have 100 percent code coverage on the AnimalLocator class.  I have no idea what's wrong with my test classes.  Does anyone have any ideas about what code be wrong?

@IsTest
private class AnimalLocatorTest {
    @isTest static  void  testGetCallout() {
    // Set mock callout class
    Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
    // This causes a fake response to be sent
    // from the class that implements HttpCalloutMock.
    String animalname = AnimalLocator.getAnimalNameById(2);
    // Verify that the response received contains fake values        
    String expectedValue = 'bear';
    System.assertEquals(animalname, expectedValue);
    }
}

@IsTest
global class AnimalLocatorMock implements HttpCalloutMock {
    //Implement this interface method
    global HTTPResponse respond(HTTPRequest request) {
        // Create a fake response
        HttpResponse response = new HttpResponse();
        response.setHeader('Content-Type', 'application/json');
        response.setBody('{"animal":{"id":2,"name":"bear","eats":"berries, campers, adam seligman","says":"yum yum"}}');
        response.setStatusCode(200);
        return response;
    }
}
 
For trailhead challenge (https://developer.salesforce.com/trailhead/lightning_components/lightning_components_uiforce), I am using below code. I am not able to figure out whats wrong in below code. I am getting error saying "The component is not using the ui:inputText component"
 
<aura:component >       
    <aura:attribute name="fName" type="String" default="Jitendra"/>
    <aura:attribute name="lName" type="String" default="Zaa"/>
    <aura:attribute name="pNumber" type="String" default="201"/>
    <aura:attribute name="sal" type="String" default="Mr."/>
 
    <ui:inputText label="First Name" value="{!v.fName}" />  
    <ui:inputText label="Last Name" value="{!v.lName}"  /> 
    <ui:inputText label="Phone Number" value="{!v.pNumber}"  />  
    
    <ui:inputSelect multiple="false" label="Salutation" value="{!v.sal}" >
        <ui:inputSelectOption text="Dr." label="Dr." />
        <ui:inputSelectOption text="Mr." label="Mr."/>
        <ui:inputSelectOption text="Mrs." label="Mrs."/>
        <ui:inputSelectOption text="Ms." label="Ms."/>
	</ui:inputSelect> 
    <ui:button label="Submit"/>
</aura:component>