• subhasis dhar
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi All,

I am new to APEX coding and would be working on following assignment. 
Could you please guide me the steps.
  
        - Deploy FinancialForce.page file into your Salesforce Free Account.( Page file provided)
        - Modify the page code to remove the sidebar and the header
        - Modify the page code so that you’re able to export it as PDF in landscape mode
        - Modify the PDF exporting settings to export a table of only 10 records on each page. 
        - Insert a Header text of "Financial Force" to the left, center, and right of the page and display it on each page.
        - Insert a Footer with the page number/no of pages to the center of each page. 
        - Export the page with the customizations listed above into a PDF file, name it 'FinancialForce.pdf'
        - Export the page with the customizations listed above into an Excel file, name it 'FinancialForce.xls' (you may need to remove PDF export code)

 
I'm doing the simple lightning components challenge and have hit this problem in my existing trailhead org and a brand new dev org that I've just created:

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: QVWBQHAG
Create an Apex class that returns an array (or list) of strings: 
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.

MyApexClass to above Challenge:

public class StringArrayTest {
    
    public static List<string> generateStringArray(Integer n)
    {
        List<String> myArray = new List<String>();
        
        for(Integer i=0;i<n;i++)
        {
            myArray.add('Test'+i);
            System.debug(myArray[i]);
        }
        return myArray;
        
    }


It's compile and execute as per requirement in Developer console. But Traihead showing the below 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.

Anyhelp would be greatly appreciated. Thanks.