• yi zhang 43
  • 35 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
Automate record creation
Install the unmanaged package for the schema and stubs for Apex classes and triggers. Rename cases and products to match the HowWeRoll schema, and assign all profiles to the custom HowWeRoll page layouts for those objects. Use the included package content to automatically create a Routine Maintenance request every time a maintenance request of type Repair or Routine Maintenance is updated to Closed. Follow the specifications and naming conventions outlined in the business requirements.
how to achieved ?

This is the trailhead questions which I am trying to solve :

Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.

Here is my code :

public class StringArrayTest {
    public static List <String> generateStringArray (Integer n) {
       List<String> List1 = new List<String> ();
        for(Integer i=0;i<n;i++) {
          List1.add('\'Test'+ i+'\'' );
        return List1;


I am getting following error :

Challenge not yet complete... here's what's wrong: 
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.

I tried it many times but I am not able to solve this problem. Please help. 

Working on TrailHead Challenge... (https://developer.salesforce.com/trailhead/force_com_introduction/data_security/data_security_sharing_rules)

Tasks completed:
The custom object must be named 'Project' with a resulting API name of 'Project__c'.   Done
The Name field for 'Project' must be of type Text (not Auto-Number).  Done
The custom object 'Project' must have a custom field of type picklist named 'Priority' with a resulting API name of 'Priority__c'. Done
The role label should be 'Training Coordinator' with the resulting 'Role Name' of 'Training_Coordinator'. Note that you may already have this role in your role hierarchy from a previously attempted challenge.   Done
Set the organization wide settings to public read only.    Done

Here is where I think is the problem:
The sharing rule can be named anything.  
Create sharing rule under "Sharing Settings" under Project Sharing Rules..  Create a criteria based project sharing rule with Priority custom field equal to High.  Shared with role "Training Coordinator" as read-only access.

What am I missing?