• Parker Edelmann
  • SMARTIE
  • 1740 Points
  • Member since 2015
  • Salesforce Administrator


  • Chatter
    Feed
  • 50
    Best Answers
  • 4
    Likes Received
  • 15
    Likes Given
  • 5
    Questions
  • 462
    Replies

Hey,
I am already a salesforce developer in a company based in Poland. Since I know this platform, I have decided to write my engineering work/bachelors of science about salesforce and create an app on it. Therefore I need a developer enviroment for about 6-12 months that will not expire. All the free ones are for one month freely only. Have You got guys any sugestions what I could do? I already wrote about 4-5 times question/ to suport asking the same question again and again, and each one is telling me to write to someone else.
Regards,

Mateusz WK

Here's what I have in "English": If the value in a field is either of 2 picklist values, then put a 1 in the formula field. If it is either of two different picklist vales, place a 2, etc. There are 5 pairs of these. Do I need another layer of ORs, different punctuation? I don't know. Please help! Also, the "0" at the end is not a valid picklist value, it's just a placeholder.

IF(OR (ISPICKVAL(InspectionType__c="Type 1"),(ISPICKVAL(Inspectiontype="1. Complete Final Inspection with full H&S diagnostics and air leakage diagnostics")),"1",
IF(OR(ISPICKVAL (InspectionType__c="Type 2"),(ISPICKVAL(Inspectiontype="2. Final Inspection with full health and safety diagnostics")),"2",
IF (OR (ISPICKVAL(InspectionType__c="Type 3"),(ISPICKVAL(Inspectiontype="3. Final Inspection with air leakage diagnostics")),"3" , 
IF (OR (ISPICKVAL(InspectionType__c="Type 4"),(ISPICKVAL(Inspectiontype="4. Final Inspection with gas leak test only")),"4", 
IF (OR (ISPICKVAL(InspectionType__c="Type 5"),(ISPICKVALInspectiontype="5. Final Inspection with no diagnostics")),"5", "0"))))) 
Greetings, I am working on the Prevent XSS in Force.Com Applications Trailhead, so far I've gotten most of the sections cleared. However, I seem to be stuck with this one. I've attempted many ways to assign JSENCODE, HTMLENCODE and JSINHTMLENCODE where needed but seem to stuck, are there any steps I should take here. My code's below. Hope it helps!
 
<apex:page controller="XSS_Mitigations_Challenge" sidebar="false" tabStyle="XSS_Mitigations_Challenge__tab">
<apex:sectionHeader title="XSS Mitigations Challenge" />
<apex:form >
    <apex:pageBlock >
        <apex:pageMessages />      
        <apex:pageBlockSection title="Demo" columns="1" id="tableBlock">
            <c:codeLink type="Visualforce" namespace="" edit="true" name="XSS_Mitigations_Challenge" description="Edit this Visualforce page to perform the challenge."/>
            
            
            <apex:outputText value="{!JSENCODE(sampleMergeField1)}"/>


            <apex:outputText value="{!HTMLENCODE(sampleMergeField2)}" escape="false"/>


            <apex:outputText >
                {!sampleMergeField3}
            </apex:outputText>
       
       
            <script>
                document.write('{!JSENCODE(sampleMergeField4)}');
            </script>
             
            
            {!sampleMergeField5}
            
            
            <script>
                var x = '{!JSENCODE(sampleMergeField6)}';
            </script>
            
            
            <apex:outputLabel value="{!sampleMergeField7}" escape="false"/>
                     

        </apex:pageBlockSection>
        <apex:pageBlockSection title="Code links" columns="1">
            <apex:outputPanel >
                <ul>
                    <li><c:codeLink type="Visualforce" namespace="" name="XSS_Mitigations_Challenge" description="Visualforce Page"/></li>            
                    <li><c:codeLink type="Apex" namespace="" name="XSS_Mitigations_Challenge" description="Apex Controller"/></li>
                </ul>
            </apex:outputPanel>        
        </apex:pageBlockSection>        
    </apex:pageBlock>          
</apex:form>              
</apex:page>

 
If user A wants to receive a notification when a new case is opened with the status of "New" during business hours. Which could be the best automation processs could be used to accpmplish this?

Escalation rules OR Process Builder OR Visual Workflow?
Hi all,
I want to create a formula field that based on the record type inserts a text value.
so if my record type equals 1 or 2 I want the text to display as A, if my record type is 3 or 4 I want the text to display as B, if my record type is 5 or 6 I want the text to display C, if my record type is 7 I want my text to display D, if my record type is 8 I want the text to display E

Thanks in advance!
Hi, 

I want to restrict a date field and a currency field from being edited. The description for this rule should be that -
If(
a) 20th of the current month

b) Close date is within next month.)
//When above condition is true apply the following rule
-> Lock 'Close Date' and 'Amount' 

 
For example if todays date was September 20th and I had a opportunity where its Close date is in October. The close date and amount should be locked. 

How can I get this rule to apply to opportunities? 

Thank you,

 
  • September 16, 2016
  • Like
  • 0
When I get to the end of the last module in the Reports and Dashboards badge, I follow the steps to bring the Salesforce Adoption Dashboards into my developer org, only to get a message that the app has been deleted or does not exist.  I see the app was uploaded in 2011.  Is there an update or am I facing a different issue?  Here is the message I receive:

User-added image
The Trailhead unit Extending Reports using the AppExchange requires you to download the Adoption Dashboard.  I keep getting an error when trying to downlown that says "Package Not Found - The request packages does not exist or had been deleted.  Please contact the package publisher for assitance.  If this is a recently updated package, please try again soon".  
Any suggestions on how to get this corrected so I can complete my Superbadge?  
I am completing a challenge, when I went to Check it, the below red box popped up.  any suggestions how to correct? ( can you read it or is it too tiny?)

User-added image
Hi,

I have a formula written in a formula field, and I'm pretty sure the layout is correct, but I can't get the syntax right! I believe there is a parenthesis or comma out of place, but I can't find it and it's driving me nuts. I've tried for over an hour and can't seem to get it. Any help would be greatly, greatly appreciated!

Formula:
IF(PricebookEntry.Product2.CXO_Service__c=True,
IF(
AND(
ISPICKVAL(Opportunity.New_Renew__c,"Renewal"),
NOT(Product_Family__c="Learning")
)
,

IF(Amount_for_Retention__c>CV_to_Renew__c,Annual_NCVI_Amount__c,
Probable_CV_Retained__c-CV_to_Renew__c)

,
Annual_NCVI_Amount__c))

,

IF(
AND(Opportunity.TA_Migration_Transaction__c=True,ISPICKVAL(PricebookEntry.Product2.Team_Access_Product__c,"Standard"),-1*CV_to_Renew__c)

,

IF(
AND(
ISPICKVAL(Opportunity.New_Renew__c,"Renewal"),
NOT(Product_Family__c="Learning")
)
,

IF(Amount_for_Retention__c>CV_to_Renew__c,Annual_NCVI_Amount__c,
Probable_CV_Retained__c-CV_to_Renew__c)

,
Annual_NCVI_Amount__c)



 
I'm Getting an error on a trailhead module (Reports & Dashboards Specialist) Step 3

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: MPMXRLBI

User-added image
  • If  notice period checked to true, resignation date cannot be null.
Hi all,
I m trying to create a formula field  but showing error..
can any one help me to crack this this problem.??
Thank you.

User-added image
In the trailhead for Process Automation : https://developer.salesforce.com/trailhead/force_com_dev_beginner/business_process_automation/process_whichtool 
it's mentioned that the workflow rule can configure action to be executed at different times : 
Configure actions to be executed at different times.
but when i consulted the interface of the Process builder we can establish immediate actions and MANY scheduled actions to be executed. so i don't know if it's an error or the Process Builder Has been updated in the last releases.

Thank you for you help.

 
I have created a custome object "Application" using the salesforce admin license and I have created a role "Sales Executive" with salesforce platform license.where in when I have logged into the Sales Executive profile I am unable to see the custome object "Application" in his tab.Please help me
Hi there,

Can someone advise me on how to create a forluma with languages and genders please. I have created picklists of languages, German and English, and genders, Female and Male. I would like to create a new formula field for the letter salutations. For instance, If a contact is a female and speaks German, her salutation will be Frau. I am new to Salesforce. Any advice will be much appreciated!!

Thank you,
  • August 07, 2016
  • Like
  • 1
Hi Guys. 
I have just begun the SuperBadge: Lightning Experience Specialist. I am unable to rename standard objects. Any thoughts? 
Cheers. 
Mark
I have 47 badges, but only 35 of them appear in the Community where I connected my Trailhead account.
I'm experiencing a signficant delay when attempting to install the managed package to complete the Security Superbadge -- over 45 minutes and no email marking completion or evidence the component(s) have installed.  I think it's just an Apex class so flagging in case there's a systemic issue.
Hello Everyone,

Today, I have a challenge for you all. I'm not a developer and don't have the experience to do this, but I'm very certain that what I'm asking for can be done with Apex. In short, I'd like an Apex class, prefably with Unit Test, that can make this idea, a reality: https://success.salesforce.com/ideaView?id=0873A000000E396QAC

In summary, I'd like to call an Apex class that will compare the values of two collections passed from Visual Workflow. It should four collections: the values that both collections have in common, all the values, the values that are in only the first collection, and the values that are only in the second collection.

The requirements are:
  1. It should be capable of taking two collection variables of the same data type and compare them as described above.
  2. It should be capable of taking two sObject Collection variables and compare them.
  3. For bonus points, it should be able to take a field of an sObject Collection variable and compare it to a Collection, or a field of another sObject Collection variable.
  4. For even more bonus points, it could take an sObject variable or a regular variable, not a collection, compare it to a Collection of the appropriate type, and return true if the sObject variable or variable is a member of the Collection Variable.
I feel like I'm asking for a miracle, but the Spring '17 release is too long to wait for Salesforce to implement this idea, if they decide that quickly to implement it. Let's create our own code so that we can use it, and if Salesforce wants to implement this feature, they can adapt our code to Salesforce standards.

Let's do it!

Best Regards,
Parker Edelmann
This error can be caused in one of two ways:
  1. ​You've been away for a while and you're now logged out of your DE. This can simply be resolved by logging in again and restoring the connection.
  2. No matter how many times you log out and log in again, having the security setting "Lock sessions to the IP address from which they originated" enabled will prevent you from connecting your Org to Trailhead. For some reason, when trailhead checks challenges, it doesn't use the same IP address throughout the transaction, causing the error because the connector was logged out. As much as I'd like to claim this as my own discovery, @Matt Latto was the one to come up with the solution and posted it on another question, Not able to verify steps of Trailhead project.
Although this isn't officially a question, to my knowledge this information is not anywhere else on the forum, and if it is, it couldn't hurt to post it again.

Thanks for viewing,
Parker
Hello Everyone,
I was wondering how to disable the "opening sequence" in lightning experience? When you log in or open a new page using lightning, you have to watch the butterfly flap it's wings for a minute or until it's obvious it's not going to work and you have to revert to classic. This is one of my many grievances concerning lightning. My other big one is that you rarely can open other pages in new tabs because it's all done with Java, but even then you still have to watch the butterfly. Can anyone please help me with this?

Much appreciative,
Parker
Recently I tried logging into an Org that had TLS 1.0 disabled without me knowing it. I thought I'd be fine when TLS 1.0 was disabled, but I guess not. I am using Windows 10 as my operating system, and Chrome as my browser. The version of Chrome is Version 49.0.2623.108 m, much higher than the required 37 or 38. Here's a screenshot of the Related security settings:
User-added image
Then here's the error screen:
User-added image
If anyone has even any kind of long shot speculative guess of how or why this is happening (or any suggestions as to how to solve it), I'd greatly appreciate it.

Thanks in advance,
Parker
Hello all,

On the Account Object, I have a field called Pipeline Rep (with an API name of Pipeline_Rep__c, obviously) that is a lookup to user. The trigger is supposed to update all related contact's owner to the Pipeline Rep when it is changed. Unfortunately, I'm given an "Invalid foreign key relationship: Account.Pipeline_Rep__c" on lines 8 and 10. Here's the trigger:
trigger UpdateContacttoPipelineRep on Account (after update) {
          
    List<Contact> Contacts_to_Update = new List<Contact>();
    
    for(Contact evaluatecontact: [SELECT Id FROM Contact
                                 WHERE AccountId IN :Trigger.New]) {
   
        if(evaluatecontact.Account.Pipeline_Rep__c.Trigger.old !=evaluatecontact.Account.Pipeline_Rep__c){ 
               System.debug('The Pipeline Rep was changed');
         evaluatecontact.owner.Id = evaluatecontact.Account.Pipeline_Rep__c.Id;
        Contacts_to_Update.add(evaluatecontact);
          }
                                            }
    update Contacts_to_Update;
}
I am new to apex, having only recently finished the Developer Beginner Trail, minus the VisualForce module. I know this can be done with Process Builder, but I thought I'd give it a shot programmatically in my Developer Edition. I'd greatly appreciate it if anyone could tell me what the Invalid foreign key relationship error means, and how to fix it.

Thanks,
Parker
This error can be caused in one of two ways:
  1. ​You've been away for a while and you're now logged out of your DE. This can simply be resolved by logging in again and restoring the connection.
  2. No matter how many times you log out and log in again, having the security setting "Lock sessions to the IP address from which they originated" enabled will prevent you from connecting your Org to Trailhead. For some reason, when trailhead checks challenges, it doesn't use the same IP address throughout the transaction, causing the error because the connector was logged out. As much as I'd like to claim this as my own discovery, @Matt Latto was the one to come up with the solution and posted it on another question, Not able to verify steps of Trailhead project.
Although this isn't officially a question, to my knowledge this information is not anywhere else on the forum, and if it is, it couldn't hurt to post it again.

Thanks for viewing,
Parker
Hello Everyone,
I was wondering how to disable the "opening sequence" in lightning experience? When you log in or open a new page using lightning, you have to watch the butterfly flap it's wings for a minute or until it's obvious it's not going to work and you have to revert to classic. This is one of my many grievances concerning lightning. My other big one is that you rarely can open other pages in new tabs because it's all done with Java, but even then you still have to watch the butterfly. Can anyone please help me with this?

Much appreciative,
Parker
I have created a custom tab using REST API and i manually create a permission set in my dev account and access the readability settings of the tab. But in SalesforceIQ starter plan permission sets are not available, how do i change the readability settings of custom tab in this case?

Hey,
I am already a salesforce developer in a company based in Poland. Since I know this platform, I have decided to write my engineering work/bachelors of science about salesforce and create an app on it. Therefore I need a developer enviroment for about 6-12 months that will not expire. All the free ones are for one month freely only. Have You got guys any sugestions what I could do? I already wrote about 4-5 times question/ to suport asking the same question again and again, and each one is telling me to write to someone else.
Regards,

Mateusz WK

Hi All,

I need someone 's help who is expert in the flow. i want to count the task(where ingenus task check box is fals) on lead objcet. i cfreated flow and calling flow into process builder but not getting result on lead . here are the screenshots of flow and process builderUser-added imageUser-added imageUser-added imageUser-added imageUser-added image
I have created a visual flow that collects all contacts that meet certain requirements, stores them in a sObject collection, preforms functions on the data in zip codes fields to shorten them to the first five digits, saves them in a new sObject collection, and then updates them all at once. 
This works perfectly if I preform the first lookup with either the specific contact ID, or using "Starts with" and then the correct first 5 digits of their zip code. 
HOWEVER, this flow is only useful if it works by automatically recording ALL contacts that have a zip code longer than 5 digits and then preforming the tasks just on those contacts. 

HOW can I do this? I can use 
-Equals
-Does not equal
-contains
-starts with
-ends with
-is null

PLEASE ADVISE 
Here's what I have in "English": If the value in a field is either of 2 picklist values, then put a 1 in the formula field. If it is either of two different picklist vales, place a 2, etc. There are 5 pairs of these. Do I need another layer of ORs, different punctuation? I don't know. Please help! Also, the "0" at the end is not a valid picklist value, it's just a placeholder.

IF(OR (ISPICKVAL(InspectionType__c="Type 1"),(ISPICKVAL(Inspectiontype="1. Complete Final Inspection with full H&S diagnostics and air leakage diagnostics")),"1",
IF(OR(ISPICKVAL (InspectionType__c="Type 2"),(ISPICKVAL(Inspectiontype="2. Final Inspection with full health and safety diagnostics")),"2",
IF (OR (ISPICKVAL(InspectionType__c="Type 3"),(ISPICKVAL(Inspectiontype="3. Final Inspection with air leakage diagnostics")),"3" , 
IF (OR (ISPICKVAL(InspectionType__c="Type 4"),(ISPICKVAL(Inspectiontype="4. Final Inspection with gas leak test only")),"4", 
IF (OR (ISPICKVAL(InspectionType__c="Type 5"),(ISPICKVALInspectiontype="5. Final Inspection with no diagnostics")),"5", "0"))))) 
Is there a visual flow repository where users contribute and get flows? I hate to re-invent the wheel.
I'm stuck on this section of the challenge: creating and editing an opportunity.
https://trailhead.salesforce.com/trails/mr-drive-ae-success-with-org62/modules/mr-org62-sales-productivity/units/mr-osp-work-with-opportunities

I've created the opportunity but Trailhead says I have not.  Please help. 
 
Hi,

Few month ago, I did some old trailhead module that I began but no finished. Today, I tried to continue this module but it tells me that it's impossible (module closed).
Is it possible to continue it again? Or at least, disable from my view "Active module"? It's the module "Spring '16 Release"

Thanks for your help !
Cant finish, geting the error Challenge Not yet complete... here's what's wrong: 
Could not find the published Knowledge article.   but its done what am i missing
Stuck on challenege 5

here is the error message I get:

Challenge Not yet complete... here's what's wrong: 
The 'Lightning Hobbies by Contact' report does not appear to have a locked filter.


Check out my screen shot, what am i doing wrong here???

User-added image
Wow.  That was insanely hard.  It took me a solid 2 days to complete (4-6 hours?! no.).  Here are some tips:
  • It has been updated in the past few weeks, so beware of older comments and screenshots that people share.  You should NOT copy them!
  • Detail, detail, detail.  For ALL items you create, copy and paste the names into the blanks - report names, dashboard titles, group names, etc. Check twice.
  • Expect to run into "bugs".  There were easily a dozen that I had to work around carefully.  It started with importing data needing to be CSV parsed, and ended with not being able to move the Lightning report into a folder.  
  • Before hitting the "Check Challenge" button, re-read the description of the step!  And always do them in order.  They build on each other and are pretty good about telling you what will be checked. (in this SuperBadge, at least..)
Now, some specifics about the steps:
  1. Data import was a bit off.  Excel doesn't like to export 1 tab at a time, so be very diligent about checking each CSV to see that it's good.  For some reason, the Hobby list gave me problems, so I added some data that I never mapped upon import.  And details.. a lot of details.
  2. There was an underlying report that wasn't really discussed much, so I had to create it carefully and tweak it until it did what I wanted.  And again, details.
  3. Flipping from Classic to Lightning is easy, but you have to be sure that everything is there and ready to go before you do.  As I found out the hard way, you can't edit in Classic after you start editing in Lightning, so that affects this step and step 6.  Oh, and details.. names, etc.
  4. I can't remember anything specific about this step.  But, details.
  5. I did these reports first (before checking any challenges), and it took a LONG time.  There are so many parts to get right.  The custom report type is the real key, though.  Read very carefully when setting it up, because a wrong choice there will cascade down to all of the reports and make life miserable.  Also, for some reason, my matrix report kept re-inserting columns that I had removed, so I had to check that report EVERY time I edited it.  Oh, and details, once again.
  6. This one was pretty easy once I saw the notes at the BOTTOM of the description (about creating the user, etc.).  I had already worked on the Security Superbadge (stuck, tho) so I knew how to work these well.  But as I said earlier, the Lightning Dashboard gave me the worst trouble.  I found a SFDC webpage that said it was impossible to move the dashboard into another folder!  So, improvise, which ended up working.  Oh, and yea, as you would guess... details!
I LOVED this challenge.  It took me probably 14-16 hours.  But now I feel very versed in these topics.  Thanks, SFDC and TrailHead folks!
hi ,i am trying the Lightning Experience Specialist

while i installed the  unmanaged LEX Superbadge package.
here comes the issue

"Install the unmanaged package from the pre-work if you haven’t already. Rename all of the standard objects in the schema as specified, and set the default page layouts for Adventure, Adventure Package, and Opportunity to the Relaxation Gauntlet custom layouts. Update the Opportunity stage values, create a sales path for sales reps (highlighting key fields and giving specific coaching guidance), and create an approval process as specified in the business requirements."

i am confused what i should do next .as i am unable to understand ....

help me
Hi all, I am working on the Insecure Remote Site Trailhead and can't seem to get the image to display from a static resource zip file.

I am using this as my code
 
<apex:image url="{!URLFOR($Resource.Challenge_Resources,'Challenge_resources/Castle.png')}" />

Are there any steps I should take, hope it helps.
While going thru Trailhead and learning many things, I decided to put together my own version of yet another Trailhead Leader board. I've fleshed out an example that keeps track of Name, ID, Badges, Superbadges, Comm Badges and Total Points. Sorting, ID validation are also being done. I did all of this for my own edification and learning to better reinforce the skills that Trailhead provided me. Trailhead is really quite amazing

Link to Dev Org Public Site: http://trailhead-leaderboard-developer-edition.na35.force.com

This App is one VisualSource Page and Apex controller running as a Public Site. Refresh occurs periodically from a .Net Web App using the Partner WSDL API

I'm hoping to move all of that over to Apex once I figure out a bunch of things. I see some other suggestions about dates. It would be nice to incorporate that also. I'm sure that something like this could be incorporated into Salesforce Orgs for folks to keep track of training of their employees with Trailhead. Part of the loader I've built using the Partner WSDL scans thru all of the badges of a profile and can load them into the Org somewhere.

 
Wow.  That was insanely hard.  It took me a solid 2 days to complete (4-6 hours?! no.).  Here are some tips:
  • It has been updated in the past few weeks, so beware of older comments and screenshots that people share.  You should NOT copy them!
  • Detail, detail, detail.  For ALL items you create, copy and paste the names into the blanks - report names, dashboard titles, group names, etc. Check twice.
  • Expect to run into "bugs".  There were easily a dozen that I had to work around carefully.  It started with importing data needing to be CSV parsed, and ended with not being able to move the Lightning report into a folder.  
  • Before hitting the "Check Challenge" button, re-read the description of the step!  And always do them in order.  They build on each other and are pretty good about telling you what will be checked. (in this SuperBadge, at least..)
Now, some specifics about the steps:
  1. Data import was a bit off.  Excel doesn't like to export 1 tab at a time, so be very diligent about checking each CSV to see that it's good.  For some reason, the Hobby list gave me problems, so I added some data that I never mapped upon import.  And details.. a lot of details.
  2. There was an underlying report that wasn't really discussed much, so I had to create it carefully and tweak it until it did what I wanted.  And again, details.
  3. Flipping from Classic to Lightning is easy, but you have to be sure that everything is there and ready to go before you do.  As I found out the hard way, you can't edit in Classic after you start editing in Lightning, so that affects this step and step 6.  Oh, and details.. names, etc.
  4. I can't remember anything specific about this step.  But, details.
  5. I did these reports first (before checking any challenges), and it took a LONG time.  There are so many parts to get right.  The custom report type is the real key, though.  Read very carefully when setting it up, because a wrong choice there will cascade down to all of the reports and make life miserable.  Also, for some reason, my matrix report kept re-inserting columns that I had removed, so I had to check that report EVERY time I edited it.  Oh, and details, once again.
  6. This one was pretty easy once I saw the notes at the BOTTOM of the description (about creating the user, etc.).  I had already worked on the Security Superbadge (stuck, tho) so I knew how to work these well.  But as I said earlier, the Lightning Dashboard gave me the worst trouble.  I found a SFDC webpage that said it was impossible to move the dashboard into another folder!  So, improvise, which ended up working.  Oh, and yea, as you would guess... details!
I LOVED this challenge.  It took me probably 14-16 hours.  But now I feel very versed in these topics.  Thanks, SFDC and TrailHead folks!
How can a Flow's Wait Logic Offset Unit be set in minutes?  Is there a way to convert hours or days to minutes using decimals?  For example does 0.1 = 6 minutes?

User-added image
 I need to create a formula to get difference (Minutes) between between created date and the current time excluding weekends.

Thanks in advance
I am having an issue with my points not being recognized. While I've obtained 12 badges and nearly 3k points my profile showes me with 0 points and as a Newbie. Am I missing something? Are the profile points separate from the points obtained through earning badges?User-added image
The challenge is to Create an Apex class naming StringArrayTest having function generateStringArray that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.

So I  have created following StringArrayTest Class with generateStringArray function.

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

But when i click on Ckeck Challenge. it is showing 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.

Whats Wrong in here ?
I'm getting an error when checking the Using Visualforce Pages in Page Layouts and Mobile Cards challenge. The error says that the page isn't evaluating the 'Prospecting' stage, yet the code works when I insert an Opportunity Id where the Stage = Prospecting.

The code:
<apex:page docType="html-5.0" standardController="Opportunity">
    <style>
    </style>
    
    <apex:remoteObjects >
        <apex:remoteObjectModel name="Opportunity" fields="Id,StageName" />
    </apex:remoteObjects>
    
    <div class="myPage">
        <h2>Tip for when you're in the {!Opportunity.StageName} Stage:</h2>
        <p id="stageTip" />
    </div>
    
    <script>
        var opportunityStage = "{!Opportunity.StageName}";
        document.getElementById("stageTip").innerHTML = createStageTip();
        
        function createStageTip() {
            if(opportunityStage){
                switch(opportunityStage){
                    case "Prospecting":
                        return "You need to ask really good questions"
                        break;
                    case "Needs Analysis":
                        return "Determine the needs by asking really good questions"
                        break;
                    case "Proposal/Price Quote":
                        return "Make sure the price doesn't exceed the budget"
                        break;
                    case "Negotiation/Review":
                        return "Maybe go down, but don't go down too much"
                        break;
                    default:
                        return "Use your best judgement";
                }
            }
        }
    </script>
</apex:page>
If you have any ideas as to why this isn't working, I'd love to hear them.

Cheers,
Justin
 
  • December 07, 2015
  • Like
  • 1
Hi,
I am doing the "Add a Mobile Card that Displays Content Based on Opportunity Stage" challenge. It asks for a Visualforce page which displays content depending on opportunity stage.
I used the following code
       <apex:outputText rendered="{!CONTAINS(opportunity.stagename,'Prospecting')}" value="this is a good idea" />
       <apex:outputText rendered="{!CONTAINS(opportunity.stagename,'Analysis')}" value="do this" />
       <apex:outputText rendered="{!CONTAINS(opportunity.stagename,'Proposal')}" value="do that" />
       <apex:outputText rendered="{!CONTAINS(opportunity.stagename,'Negotiation')}" value="go away" />
and it works in the browser, but the challenge checks complains:
"The page isn't evaluating the 'Prospecting' stage. "
Any idea why?
 
Doing Trailhead exercise here: https://developer.salesforce.com/en/trailhead/force_com_programmatic_beginner/apex_database/apex_database_intro

This is my code:
 
public class StringArrayTest {
    public static generateStringArray(Integer x) {
        List<String> stringList = new List<String>();
        for (integer n=0; n<x; n++) {
            stringList.add('Test '+n);
        }
        return stringList;
    }
}
I get the error message "Constructors cannot be static" on line 2, but I can not find anywhere an example of a public static method that returns a value.  How can I fix this?

Thank you,
Brian
 

When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.  

 

That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.