• Doug Dunfee
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Salesforce Consultant
  • Antero, Inc.


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 0
    Questions
  • 7
    Replies
Hello all, I receive the following message in Trailhead. I think that the exploration and filter are set up properly. I don't know what I am doing wrong. Would you please help?
I am unable to complete the hands-on challenge "Create a lens that shows which industry is buying the most laptops" I continue to receive the following error even after multiple attempts.

"Challenge Not yet complete... here's what's wrong: 
The 'Top Laptop Industry' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly."
​I keep getting

Challenge Not yet complete... here's what's wrong: 
The 'Top Laptop Industry' lens was not found. Please follow the requirements and ensure everything is setup correctly


I have named the Lens as step 2 - Enter D01 - Laptops Salespeople - Wall of Fame as the title AND/OR result set Top Laptop Industry

Neither seem to work. I have refresed the screen, even cleared cookies and rebooted the computer. 

Hi All,

In attempting to compile the first test class provided in the 'Explore Custom Transaction Security Policies' module, I receive 2 compile errors.

The first was around line 29, where the semi colon beside eventData needs to be moved outside of the right parenthesis.

However after trying to compile after that change there is another error complaining that the platform field of the LoginHistory object (declared as loginHistoryObj for our instance) is not writeable.  Below are the lines of importance...

    /* Create a history object that has Platform = Android 4. */
    LoginHistory loginHistoryObj = new LoginHistory();
    loginHistoryObj.Platform = 'Android 4';  <----
this is where the compile is complaining (Error: Compile Error: Field is not writeable: LoginHistory.Platform at line 7 column 5)

I checked the LoginHistory Object documentation, and it looks like it should be writeable to me.

Does anyone have any suggestions? or is this a bug of some sort?

Hi I am looking for a easy way to print or export a large Field Dependency matrix in excel. I am new to saleforce please guide me with complete details.
  • January 30, 2014
  • Like
  • 0
I seem to be stuck on this trailhead module or write negative tests unit, while I have 93 percent code coverage, I can't seem to get the code coverage to hit 100 percent at the "returnValue" piece doesn't seem to hit.
My code is as follows.

Calculator Class
 
public class Calculator {
 public class CalculatorException extends Exception{}

  public static Integer addition(Integer a, Integer b){
   return a + b;
    }

   public static Integer subtraction(Integer a, Integer b){
    return a - b;
    }

 public static Integer multiply(Integer a, Integer b){
  if(b==0 || a==0){
  throw new CalculatorException('It doesn\'t make sense to multiply by 
   zero');
  }
  return a * b;
  }

 public static Decimal divide(Integer numerator, Integer denominator){
  if(denominator == 0){
  throw new CalculatorException('you still can\'t divide by zero');
   }
 Decimal returnValue = numerator / denominator;
  if(returnValue < 0){
    throw new CalculatorException('Division returned a negative value.' + 
 returnValue);
 }
   return returnValue;
  }


 }

And my test class as follows
 
@isTest
   public class Calculator_Tests {

@isTest
 public static void addition() {
    Calculator.addition(1, 0);
   }
@isTest
  public static void subtraction() {
    Calculator.subtraction(1, 0);
   }

@isTest
 public static void divide_throws_exception_for_division_by_zero() {
 Boolean caught = false;
 try {
    Calculator.divide(1, 0);
  } catch (Calculator.CalculatorException e) {
    System.assertEquals('you still can\'t divide by zero', e.getMessage(), 
  'caught the right exception');
    caught = true;
   }
   System.assert(caught, 'threw expected exception');
   }

  @isTest
 public static void divide_throws_exception_for_division_by_two() {
 Boolean caught = true;
 try {
    Calculator.divide(1, 2);
 } catch (Calculator.CalculatorException e) {
    System.assertEquals('you still can\'t divide by zero', e.getMessage(), 
  'caught the right exception');
    caught = true;
   }
   System.assert(caught, 'threw expected exception');
 }


@isTest
public static void multiply_by_one() {
  Boolean caught = false;
  try {
    Calculator.multiply(1, 0);
    } catch (Calculator.CalculatorException e) {
    System.assertEquals('It doesn\'t make sense to multiply by zero', 
    e.getMessage(), 'caught the right exception');
     caught = true;
    }
    System.assert(caught, 'threw expected exception');
  }

@isTest
 public static void multiply_by_two() {
  Boolean caught = true;
  try {
     Calculator.multiply(1, 2);
   } catch (Calculator.CalculatorException e) {
    System.assertEquals('It doesn\'t make sense to multiply by zero', 
  e.getMessage(), 'caught the right exception');
    caught = true;
   }
   System.assert(caught, 'threw expected exception');
}   
}

 
Hi on step 3 of the trailhead badge « picklist Administration » I get this error see image. User-added image

Hi All,

In attempting to compile the first test class provided in the 'Explore Custom Transaction Security Policies' module, I receive 2 compile errors.

The first was around line 29, where the semi colon beside eventData needs to be moved outside of the right parenthesis.

However after trying to compile after that change there is another error complaining that the platform field of the LoginHistory object (declared as loginHistoryObj for our instance) is not writeable.  Below are the lines of importance...

    /* Create a history object that has Platform = Android 4. */
    LoginHistory loginHistoryObj = new LoginHistory();
    loginHistoryObj.Platform = 'Android 4';  <----
this is where the compile is complaining (Error: Compile Error: Field is not writeable: LoginHistory.Platform at line 7 column 5)

I checked the LoginHistory Object documentation, and it looks like it should be writeable to me.

Does anyone have any suggestions? or is this a bug of some sort?

http://yardstickappquest.notlong.com/

 

Vote for Yardstick in the Salesforce AppQuest 11 contest using the link above and get it free! Yardstick is a web analytics tool that tracks user activity in Salesforce. Yardstick can track any page in Salesforce that displays the sidebar and can track all users or a group of users.


Anyone who votes for Yardstick on Facebook before August 5 will get it free to install in their org! Just send me an email to quentinfish at hotmail dot com after you vote for Yardstick and I'll send you the package URL and password. Feel free to let your Salesforce contacts know about this offer - if they vote they'll get it free, too!

Thanks!