• bobnunny1
  • NEWBIE
  • 83 Points
  • Member since 2010


  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 46
    Replies

I have an apex:input field that when the button is clicked for the form, the value for the field is not persisted into the controller for it to see (NULL).  startingDate and endingDate are always NULL in the controller when the button is clicked.  Can anyone see anything wrong?

PAGE: 
 

<apex:page controller="ManagementController" title="Management" docType="html-5.0">
    <apex:pageMessages id="PageMessages"/>
    <apex:form id="mainForm">
        <apex:tabPanel id="tabMainPanel" switchType="client" selectedTab="Statement" >
            <apex:tab id="tabIncomeStatement" label="Income Statement" name="Statement">
                <apex:pageBlock id="pbStatement" title="Statement">
                    <apex:pageBlockButtons id="eventButtons" >
                        <apex:commandButton id="compute" immediate="true" value="Compute" title="Click to Compute for a given period." action="{!income}" rerender="pnlIncome"/>
                    </apex:pageBlockButtons>
                    <apex:outputPanel id="pnlIncome" rendered="true">
                        <apex:pageBlockSection title="???" columns="1" showHeader="false">
                            <apex:input id="dtStartingDate" type="date" value="{!startingDate}" label="Start Date" title="Enter the Start Date for the calculations.  Defaults to 1/1/2022." />
                            <apex:input id="dtEndingDate" type="date" value="{!endingDate}" label="End Date" title="Enter the End Date for the calculations.  Defaults to 12/31/2099." />
                            <apex:outputText id="periodResults" label="Requested Period Results" title="PeriodResults" value="{0, number, $###,###.00}" style="font-size:20px">
                                <apex:param value="{!periodIncome}" />
                            </apex:outputText>
                            <apex:outputText id="globalResults" label="Global Results Period: 1/1/2022 - 12/31/2099" title="GlobalResults" value="{0, number, $###,###.00}" style="font-size:20px">
                                <apex:param value="{!globalIncome}" />
                            </apex:outputText>
                        </apex:pageBlockSection>
                    </apex:outputPanel>
                </apex:pageBlock>
            </apex:tab>
        </apex:tabPanel>
    </apex:form>
</apex:page>
I'm trying to complete the trail module named in the subject, but I'm getting an error of:
Challenge Not yet complete... here's what's wrong: 
Couldn't find newField.behavior set to 'Metadata.UiBehavior.Edit', or newField.field set to 'AMAPI__Apex_MD_API_Twitter_name__c' or method doesn't return 'layoutMetadata'. Please double-check the instructions

Everything looks right to me in the class.  I can't use the namespace they provide because it's already taken.   Earlier in the exercise, it tells you to use your own namespace which I've done.  Can anyone see what's wrong?
 
public class UpdateContactPageLayout {
    // Add custom field to page layout
    
    public Metadata.Layout addLayoutItem () {
        
        // Retrieve Contact layout and section 
        List<Metadata.Metadata> layoutsList = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Contact-Contact Layout'});
        Metadata.Layout layoutMetadata = (Metadata.Layout) layoutsList.get(0);
        Metadata.LayoutSection contactLayoutSection = null;
        List<Metadata.LayoutSection> layoutSections = layoutMetadata.layoutSections;
        for (Metadata.LayoutSection section : layoutSections) {
            
            if (System.equals(section.label, 'Additional Information')) {
                contactLayoutSection = section;
                break;
            }
        }
        
        // Add the field under Contact info section in the left column
        List<Metadata.LayoutColumn> contactColumns = contactLayoutSection.layoutColumns;     
        List<Metadata.LayoutItem> contactLayoutItems = contactColumns.get(0).layoutItems;
        
        // Create a new layout item for the custom field
        Metadata.LayoutItem newField = new Metadata.LayoutItem();
        newField.behavior = Metadata.UiBehavior.Edit;
        newField.field = 'BOBN_TRAILHEAD__Apex_MD_API_Twitter_name__c';
        contactLayoutItems.add(newField);
        
        return layoutMetadata;
    }
}

 
I am trying this new Trail and receiving errors trying to install the package.  I created a brand new playground for it, and then clicked the link.  It told me:
This app can't be upgraded.
There are problems that prevent this package from being installed.
Unable to install.The unmanaged package "Trailhead Project" is already installed in your organization. You will need to uninstall it before installing a new version.

Trailhead Project is automatically created in a new playground, but the instruction makes it seem as if it's trying to install the DreamHouse app.  Could this be an incorrect Link?
Trying this Trailhead exercise, but when I try to create the FORCEDROID, after answering the prompts, I get the below error after "Saving android@~6.1.2 into config.xml file".  Any ideas?

forcedroid failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 --force
Error: Failed to fetch plugin https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\robertn\AppData\Local\Temp\npm-7184-bd5e8d4a\git-cache-83631921\24a997d4581941c692b26ba
e755b2c5360fff306
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "https
://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0" "--save"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\robertn\TrailheadHybridApps\node_modules\npm-debug.log
I'm trying the challend for "Service Cloud Macros - Create and Run Macros".  But when I go to create the Macro, the macro instructions are empty.  I have a feedbased layout for Case and multiple quick actions associated, but no instructions.  What am I missing?
The last 3 challenges I've completed, Trailhead isn't showing the link to Linked In any longer.  Wonder if this is intentional and not supported now.
I'm on this module and it wants me to click "build and run".  But there is no Build & Run on the screen.  In addition, the left panel described doesn't show, so it doesn't give me the URL in the top line.  Is this a new version and the data is elsewhere?  I've clicked everything on the screen trying to get it.
Attempting this badge, I am clicking the paperclip to create a new Case and there is no option for Case.  Just Maintenance Request, Lead, Account, and Contact.  I refollowed all previous steps and can't see anyplace where we have to associate Case to this.  Can anyone help?
I'm getting the below error on step 6 of the Lightning Experience.  Has anyone else received this?  It's coming from when they are trying to delete their own contact that they created, but can't because of:

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.DmlException: Delete failed. First exception on row 0 with id 0035000002glBWHAA2; first error: DELETE_FAILED, Your attempt to delete Sam the ninja could not be completed because it is associated with the following adventure packages.: null, null : []
All, I'm receiving the below error when trying this challenge.
The 'Sales Manager' dashboard does not have the correct headers and titles for the chart components.

I've tried many things including changing the base field for the Summary to the OOB fields, but it doesn't help.  My configurations are shown below and seem to match the requirements as exactly as I can find.  Does anyone else have any suggestions?  Can't find a Salesforce help for the Superbadges.

User-added image
Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)
I am using Trailhead "Getting Started with Entitlements" and cannot find Entitlement Management in my Quick Search of Setup.  I have it in my regular Salesforce Org, but not my Developer Edition Org.  Do I need to open a ticket to get this?
Installed Node.js and then tried the install for Cordova and I'm receiving:
npm ERR! notsup Not compatible with your operating system or architecture: force ios@4.1.1

I tried installing both versions, but still receive this error.  Does anyone have any ideas?
The Packaging an ISV App challenge specifies that you need a Partner Developer Edition to complete it.  However, if you don't have one, it tells you to go back to Creating and Managing ISV Development Orgs to create one.  However, I can't find on that module where it tells you to how to get a PARTNER Developer org.  I created a fresh org as it suggested to create the My Domain, but don't see anything for the Enviroment Hub. 

Thanx!
When performing the Getting Started with Hybrid Development trail, I am receiving "You must set the ANDROID_HOME environment variable to the path of your installation of the Android SDK." when I try the "forcedroid create" command.  I can't find it after my install.  Does anyone know where it installs to?

Is there a way in my APEX Trigger to know that the update was fired from an API update rather than via the GUI or system itself?  Thanx!

I'm trying to complete the trail module named in the subject, but I'm getting an error of:
Challenge Not yet complete... here's what's wrong: 
Couldn't find newField.behavior set to 'Metadata.UiBehavior.Edit', or newField.field set to 'AMAPI__Apex_MD_API_Twitter_name__c' or method doesn't return 'layoutMetadata'. Please double-check the instructions

Everything looks right to me in the class.  I can't use the namespace they provide because it's already taken.   Earlier in the exercise, it tells you to use your own namespace which I've done.  Can anyone see what's wrong?
 
public class UpdateContactPageLayout {
    // Add custom field to page layout
    
    public Metadata.Layout addLayoutItem () {
        
        // Retrieve Contact layout and section 
        List<Metadata.Metadata> layoutsList = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Contact-Contact Layout'});
        Metadata.Layout layoutMetadata = (Metadata.Layout) layoutsList.get(0);
        Metadata.LayoutSection contactLayoutSection = null;
        List<Metadata.LayoutSection> layoutSections = layoutMetadata.layoutSections;
        for (Metadata.LayoutSection section : layoutSections) {
            
            if (System.equals(section.label, 'Additional Information')) {
                contactLayoutSection = section;
                break;
            }
        }
        
        // Add the field under Contact info section in the left column
        List<Metadata.LayoutColumn> contactColumns = contactLayoutSection.layoutColumns;     
        List<Metadata.LayoutItem> contactLayoutItems = contactColumns.get(0).layoutItems;
        
        // Create a new layout item for the custom field
        Metadata.LayoutItem newField = new Metadata.LayoutItem();
        newField.behavior = Metadata.UiBehavior.Edit;
        newField.field = 'BOBN_TRAILHEAD__Apex_MD_API_Twitter_name__c';
        contactLayoutItems.add(newField);
        
        return layoutMetadata;
    }
}

 
Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)
The Packaging an ISV App challenge specifies that you need a Partner Developer Edition to complete it.  However, if you don't have one, it tells you to go back to Creating and Managing ISV Development Orgs to create one.  However, I can't find on that module where it tells you to how to get a PARTNER Developer org.  I created a fresh org as it suggested to create the My Domain, but don't see anything for the Enviroment Hub. 

Thanx!

I have an apex:input field that when the button is clicked for the form, the value for the field is not persisted into the controller for it to see (NULL).  startingDate and endingDate are always NULL in the controller when the button is clicked.  Can anyone see anything wrong?

PAGE: 
 

<apex:page controller="ManagementController" title="Management" docType="html-5.0">
    <apex:pageMessages id="PageMessages"/>
    <apex:form id="mainForm">
        <apex:tabPanel id="tabMainPanel" switchType="client" selectedTab="Statement" >
            <apex:tab id="tabIncomeStatement" label="Income Statement" name="Statement">
                <apex:pageBlock id="pbStatement" title="Statement">
                    <apex:pageBlockButtons id="eventButtons" >
                        <apex:commandButton id="compute" immediate="true" value="Compute" title="Click to Compute for a given period." action="{!income}" rerender="pnlIncome"/>
                    </apex:pageBlockButtons>
                    <apex:outputPanel id="pnlIncome" rendered="true">
                        <apex:pageBlockSection title="???" columns="1" showHeader="false">
                            <apex:input id="dtStartingDate" type="date" value="{!startingDate}" label="Start Date" title="Enter the Start Date for the calculations.  Defaults to 1/1/2022." />
                            <apex:input id="dtEndingDate" type="date" value="{!endingDate}" label="End Date" title="Enter the End Date for the calculations.  Defaults to 12/31/2099." />
                            <apex:outputText id="periodResults" label="Requested Period Results" title="PeriodResults" value="{0, number, $###,###.00}" style="font-size:20px">
                                <apex:param value="{!periodIncome}" />
                            </apex:outputText>
                            <apex:outputText id="globalResults" label="Global Results Period: 1/1/2022 - 12/31/2099" title="GlobalResults" value="{0, number, $###,###.00}" style="font-size:20px">
                                <apex:param value="{!globalIncome}" />
                            </apex:outputText>
                        </apex:pageBlockSection>
                    </apex:outputPanel>
                </apex:pageBlock>
            </apex:tab>
        </apex:tabPanel>
    </apex:form>
</apex:page>
I'm trying to complete the trail module named in the subject, but I'm getting an error of:
Challenge Not yet complete... here's what's wrong: 
Couldn't find newField.behavior set to 'Metadata.UiBehavior.Edit', or newField.field set to 'AMAPI__Apex_MD_API_Twitter_name__c' or method doesn't return 'layoutMetadata'. Please double-check the instructions

Everything looks right to me in the class.  I can't use the namespace they provide because it's already taken.   Earlier in the exercise, it tells you to use your own namespace which I've done.  Can anyone see what's wrong?
 
public class UpdateContactPageLayout {
    // Add custom field to page layout
    
    public Metadata.Layout addLayoutItem () {
        
        // Retrieve Contact layout and section 
        List<Metadata.Metadata> layoutsList = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Contact-Contact Layout'});
        Metadata.Layout layoutMetadata = (Metadata.Layout) layoutsList.get(0);
        Metadata.LayoutSection contactLayoutSection = null;
        List<Metadata.LayoutSection> layoutSections = layoutMetadata.layoutSections;
        for (Metadata.LayoutSection section : layoutSections) {
            
            if (System.equals(section.label, 'Additional Information')) {
                contactLayoutSection = section;
                break;
            }
        }
        
        // Add the field under Contact info section in the left column
        List<Metadata.LayoutColumn> contactColumns = contactLayoutSection.layoutColumns;     
        List<Metadata.LayoutItem> contactLayoutItems = contactColumns.get(0).layoutItems;
        
        // Create a new layout item for the custom field
        Metadata.LayoutItem newField = new Metadata.LayoutItem();
        newField.behavior = Metadata.UiBehavior.Edit;
        newField.field = 'BOBN_TRAILHEAD__Apex_MD_API_Twitter_name__c';
        contactLayoutItems.add(newField);
        
        return layoutMetadata;
    }
}

 
Get Started with the Salesforce Platform: While Install the DreamHouse App, Initialize Sample Data is not ended. I have tried two Create a Trailhead Playground. But it same result. not eneded. Any help?
Hi,

I am on wave trailhead "Add Key Metrics to Evaluate Your Business" , While I have done requisite for the trail I am getting below error 

"Could not find the correct dashboard state. Please verify the endpoint and results are correct." 
User-added image
Completed the challenge.  Added the notification (see attached image) in the Wave developer org.  It looks like it did not save the first time.  Added the notification a 2nd time, as shown in screen capture. User-added image
URL: https://trailhead.salesforce.com/project/flow_reassign/flow_reassign_implement

Project: Build an Account Reassignment Wizard
Unit: Implement the Flow with Visualforce

As per the challenge, assigned 2 users with Salesforce license and third user with Salesforce Platform license. However with Salesforce Platform license the only available profile is Standard Platform User which gets applied. I believe that is also the reason I am unable to validate this challenge.
I'm on this module and it wants me to click "build and run".  But there is no Build & Run on the screen.  In addition, the left panel described doesn't show, so it doesn't give me the URL in the top line.  Is this a new version and the data is elsewhere?  I've clicked everything on the screen trying to get it.
I'm getting the below error on step 6 of the Lightning Experience.  Has anyone else received this?  It's coming from when they are trying to delete their own contact that they created, but can't because of:

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.DmlException: Delete failed. First exception on row 0 with id 0035000002glBWHAA2; first error: DELETE_FAILED, Your attempt to delete Sam the ninja could not be completed because it is associated with the following adventure packages.: null, null : []
Bug in Lightning Specialist Superbadge step 6? - Automate fulfillment cancellation actions.   
 
The task is when fulfillment is Cancelled, the related OpportunityLineItem unitprice (i.e., salesprice) should be same as the Fulfillment's Deposit. Simple. I manually checked this and is working fine, but when the app checks, it fails with the error : System.AssertException: Assertion Failed: Same value.  
 
ISSUE: Now, if I see the debug logs (captured when Salesforce trailhead checks this).  In below snippet (from debug logs) see the last 2 lines.  There is assertEquals which checks deposit and unitprice - Match.  But assertNotEqual is also checking deposit and unitPrice.  It fails here.  Both the values will be same, the assertNotEqual is failing because both the values are same!
 
Execute Anonymous: // make sure the deposit matches the unit price
Execute Anonymous: System.assertEquals(f1.deposit__c, oli1.unitprice); // one way in the future
Execute Anonymous: System.assertNotEquals(f2.deposit__c, oli2.unitprice); // one way in the past

How to fix this? Is this a bug?
I am get this error: "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type".

I believe i configured the report according to the instructions but it is still showing and error. Any assistance or insight would be apreciated. 
Has anyone completed this trail? I am stomped on challenge number 3, regarding created the process for fulfillment. Any pointers or guidance would be appreciated.
 
I seem to have no clue what's wrong in the report which I created. As per the requirement - Summarize the report by Account Name, the contact’s Full Name, and show the Hobby Name." Here I do not understand Full Name, as in the report we only get First Name, Last Name.
The error says - 
Challenge Not yet complete... here's what's wrong: 
The 'Lightning Hobbies by Contact' report does not appear to have either the correct report type or (most likely) the correct columns.

I have summarized the report by Account Name, then by Last Name. Another column shown is Hobbies Name. The report filter is on Hobby Type (the bucket field) = Outdoor Activities and it is locked.

Does anyone know whats wrong?

I recently ran into a problem where a Visualforce page was throwing a cryptic error message related to a custom picklist (apex:selectList).  The complete error was something like:

 

j_id0:frmSelectProductsServicesw:filterSection:j_id10:j_id15:selectedPF:Validation Error: Value is not valid

 

After some digging and research here in the forums, testing and a call to Tech Support it seemed the cause and solution for similar problems didn't quite apply.  I eventually found the solution (in my case) and wanted to share it in hopes that it would help others.

 

The cause was due to a conflict between the underlying stored data in SFDC and how certain controls behave when rendered to HTML.  In this case, there was a double space embedded in the underlying data between the Z and I in the value Product.Family field (eg. ‘S&U Z  Internal’). 

 

Background:

  1. For Visualforce controls (ie. apex.outputField, apex.outputText, apex:selectList) and modes (ie. edit and view), every control ultimately must renders as HTML.  Typical HTML rendering behavior suppresses any extra spaces within text.  That is why it is common practice to use the &nbsp to chain multiple spaces together. 
  2. In this case, the underlying stored data in the Product.Family field included a double space:
          ‘S&U Z  Internal’
    however when it was rendered to the screen, the HTML took control and used only a single space:
          ‘S&U Z Internal’
  3. Once the user clicked the submit button to begin the search, the picklist in this case tried to cross-reference the selected value with the actual data that was bound to the control and found no match, thus the cryptic error that was returned - “selectedPF:Validation Error: Value is not valid”.
          ‘S&U Z  Internal’ != ‘S&U Z Internal’

 

Funny thing is, when the underlying data is rendered in a input textbox (ie. apex.inputText), the double space is displayed.  Once I removed the double space from the underlying data, the error was fixed.

 

Hopefully this solution helps.

Thanks to Sreenivas Voore in Premiere Tech Support.