• Suzi Simmons 30
  • NEWBIE
  • 50 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 19
    Replies
I go through the lessons, but almost always have a problem I have to research, and it is hard to narrow things down.  What is the best way to not waste days trying to see why your work isn't working?  The examples usually are bits and pieces, and it would be very helpful to have access to completed, accurate, working code.  
 
Need help on quickstart lightning components.  I passed all the verification steps, but account details page doesn't list the contacts .  I do have contacts for accounts, but nothing is being displayed
Got this error with trying to complete the challenge
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 0011C00001vHhGfQAK; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Cannot delete account with related opportunities.: []
Where can I see final code examples?  When the instructions say to insert and delete and things don't work, I need to know what I did wrong.  The point here is to learn, not to frustrate the student.  I have googled and searched ALL DAY trying to see where I went wrong. 

 
Trailhead formula challenge for lead quality
It works when I click on the lead, but I can't pass the challenge:
Challenge Not yet complete... here's what's wrong: 
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.

here is my code:
field lead_quality_helper__c formula type number
IF( ISBLANK( Email    ) , 0,  1) +
IF( ISBLANK( Phone    ) , 0,  1) +
IF( ISBLANK( Company  ) , 0,  1) +
IF( ISBLANK( Title    ) , 0,  1) +
IF( ISpickval(Industry , ""), 0,1)

Here is the lead_quality__c field formula type text
CASE(Lead_Quality_Helper__c,
1, IMAGE("/img/samples/stars_100.gif", "1 star"),
2, IMAGE("/img/samples/stars_200.gif", "2 stars"),
3, IMAGE("/img/samples/stars_300.gif", "3 stars"),
4, IMAGE("/img/samples/stars_400.gif", "4 stars"),
5, IMAGE("/img/samples/stars_500.gif", "5 stars"),
IMAGE("/img/samples/stars_000.gif", "0 stars"))

Can anyone see what I am missing for the challenge?  It works just fine.
Thanks in advance

 
Hello, my trailhead example doesn't navigate to the account detail page, but I can't see my error.  It works perfectly, except it won't respond when I clink in SF1.  I googled this, and found some syntax instructions, but not exactly what is called for in this trailhead module.  Can someone see what I am doing wrong, please?


<apex:page docType="html-5.0" title="Latest Accounts">
        
<style>
.mypage{
    font-family: "ProximaNovaSoft-Regular", Calibri;
    font-size: 110%;
    padding-top: 12px;
    }
.mypage h2 {
    margin-left: 10px;
    font-weight: normal;
    font-size: 24px;
    }    
.mypage ul {
    list-style-type: none;
    padding: 0;
    }    
.mypage a {
    display: block;
    padding: 10px;
    }
.mypage li {
    border-bottom: solid 1px #b6b7bb;
    margin: 0;
    }
.mypage a:hover{
    background-color: #ffc5d9;
    text-decoration: none;
    color" #000000;    
    }
 </style>
    
    
<apex:remoteObjects >
    <apex:remoteObjectModel name="Account" fields="Id,Name,LastModifiedDate"/>
</apex:remoteObjects>
  
<div class="mypage">
    <h2>Latest Accounts</h2>
    <ul id="accountList"/>
</div>    

<script>

var ul = document.getElementById("accountList");
var account = new SObjectModel.Account();
    
account.retrieve(
        {orderby: [{LastModifiedDate: 'DESC'}], limit: 30},
         function(error, records) {
         if (error) {
            alert(error.message);
         } else{
             var html = "";
             records.forEach(function(record) {
                 html = html + "<li><a data-id" + record.get("Id") + ">" +
                     record.get("Name") + "</a></li>";
             });
             ul.innerHTML = html;
           }
         }
);
    
ul.addEventListener("click", function(e) {
   sforce.one.navigateToSObject(e.target.getAttribute("data-id"));
});
      
</script>
</apex:page>
I am having problems with the example of a visulforce page that has pagination.  They don't show how the completed page should look, and I am sure something is wrong, but I don't know what.  I have googled and looked in forums and in help, but there are no anwers I can find  to create a self contained visualforce page that displays contacts with pagination.  Everything works great, but no pagination.

Can anyone point me to where I can find the completed source code?  These trails usually show you what your completed code looks like, but this one doesn't.  I am not looking for anwers to a challenge, but just what I am doing wrong.

Thank you!  

Here is my code:
<apex:page standardController="Contact" recordSetVar="contacts">
    <apex:form>
    <apex:pageBlock title="Contacts List" id="contacts_list">
        
Filter:
   <apex:selectList value="{! filterid }" size="1">
       <apex:selectOptions value="{! listviewoptions }"/>    
       <apex:actionSupport event="onchange" reRender="contacts_list"/>
   </apex:selectList>        
        
        <!-- Contacts List -->
        <apex:pageBlockTable value="{! contacts }" var="ct">
            
         <!-- pagination -->
         <table style="width: 100%">
         <tr>
             <td>
                 <!-- page X of Y -->
                 page: <apex:outputText value=" {!PageNumber} of {! ceiling(resultsize / pagesize) } "/>
             </td>
             
             <td align="center">
                 <!-- Previous page -->
                 <!-- active -->
                 <apex:commandLink action="{! Previous }" value="« Previous"
                                   Rendered="{! HasPrevious }"/>    
                 <!-- inactive (no earlier pages) -->
                 <apex:outputText style="color: #ccc;" value="« Previous"
                 rendered="{! NOT(HasPrevious) }" />

&nbsp;&nbsp;
                 
                 <!-- Next page -->
                 <apex:commandLink action="{! Next }" value="Next »"
                                   Rendered="{! HasNext }"/>    
                 <!-- inactive (no earlier pages) -->
                 <apex:outputText style="color: #ccc;" value="Next »"
                 rendered="{! NOT(HasNext) }" />
                 
             </td>
             
             <td align="right">
                 <!-- Records per page -->
Records per page:
              <apex:selectList value="{! PageSize }" size="1">
                  <apex:selectOption itemValue="5" itemLabel="5"/>
                  <apex:selectOption itemValue="20" itemLabel="20"/>
                  <apex:actionSupport event="onchange" reRender="contacts_list"/>
              </apex:selectList>   
                 
             </td>
         </tr>    
          </table>
            
          <apex:column value="{! ct.firstname }"/>
          <apex:column value="{! ct.lastname }"/>
          <apex:column value="{! ct.email }"/>
          <apex:column value="{! ct.account.name }"/>
          <apex:column value="{! ct.birthdate }"/>
        </apex:pageBlockTable>
        
    </apex:pageBlock>
</apex:form>    
    
    
</apex:page>
Where can I see final code examples?  When the instructions say to insert and delete and things don't work, I need to know what I did wrong.  The point here is to learn, not to frustrate the student.  I have googled and searched ALL DAY trying to see where I went wrong. 

 
Challenge - Create a form to enter new items and display the list of items entered. To make our camping list look more appealing, change the campingHeader component to use the SLDS. Similar to the unit, style the Camping List H1 inside the slds-page-header. Modify the campingList component to contain an input form and an iteration of campingListItem components for displaying the items entered.
The component requires an attribute named items with the type of an array of camping item custom objects.
The component requires an attribute named newItem of type Camping_Item__c with default quantity and price values of 0.
The component displays the Name, Quantity, Price, and Packed form fields with the appropriate input component types and values from the newItem attribute.
The JavaScript controller checks to ensure that the Name, Quantity and Price values submitted are not null.
If the form is valid, the JavaScript controller pushes the newItem onto the array of existing items, triggers the notification that the items value provider has changed, and resets the newItem value provider with a blank sObjectType of Camping_Item__c.


My answer - 
<aura:component >
<aura:attribute name="items" type="Camping_Item__c[]"/>
<aura:attribute name="newitem" type="Camping_Item__c[]"  default="{ 'sobjectType': 'Camping_Item__c',
                   'Quantity__c'=0, 'Price__c'=0}"/>
 <p>Name:
        <ui:inputText value="{!v.newitem.name}"/>
    </p>    
  <p>Packed:
        <ui:inputCheckbox value="{!v.newitem.Packed__c}"/>
     
    </p>    
  <p>Price:
        <ui:inputCurrency value="{!v.newitem.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:inputNumber value="{!v.newitem.Quantity__c}"/>
    </p>
</aura:component>


Error -

Challenge Not yet complete... here's what's wrong: 
The campingList component isn't iterating the array of 'items' and creating 'campingListItem' components.

Please share the correct solution.
I cannot for the life of me, figure out what could be wrong with my campingList component markup for the "Create a Simple Camping List Lightning Component" challenge.  This is the markup for campingList.cmp:

<aura:component>
     <ul>
        <li>Bug Spray</li>
        <li>Bear Repellant</li>
        <li>Goat Food</li>
    </ul>
 </aura:component>

Please help me figure out why I am getting the error.  Thank you, Susan

 

Please advise.

I cannot edit my Lightning Experience homepage to complete the following module:

 

Building a Custom Home Page for Lightning Experience


https://developer.salesforce.com/trailhead/en/lightning_app_builder/lightning_app_builder_homepage

I cannot edit the page and creating a new app does not give me the choice of creating a new home page.

Trailhead formula challenge for lead quality
It works when I click on the lead, but I can't pass the challenge:
Challenge Not yet complete... here's what's wrong: 
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.

here is my code:
field lead_quality_helper__c formula type number
IF( ISBLANK( Email    ) , 0,  1) +
IF( ISBLANK( Phone    ) , 0,  1) +
IF( ISBLANK( Company  ) , 0,  1) +
IF( ISBLANK( Title    ) , 0,  1) +
IF( ISpickval(Industry , ""), 0,1)

Here is the lead_quality__c field formula type text
CASE(Lead_Quality_Helper__c,
1, IMAGE("/img/samples/stars_100.gif", "1 star"),
2, IMAGE("/img/samples/stars_200.gif", "2 stars"),
3, IMAGE("/img/samples/stars_300.gif", "3 stars"),
4, IMAGE("/img/samples/stars_400.gif", "4 stars"),
5, IMAGE("/img/samples/stars_500.gif", "5 stars"),
IMAGE("/img/samples/stars_000.gif", "0 stars"))

Can anyone see what I am missing for the challenge?  It works just fine.
Thanks in advance

 
I am having problems with the example of a visulforce page that has pagination.  They don't show how the completed page should look, and I am sure something is wrong, but I don't know what.  I have googled and looked in forums and in help, but there are no anwers I can find  to create a self contained visualforce page that displays contacts with pagination.  Everything works great, but no pagination.

Can anyone point me to where I can find the completed source code?  These trails usually show you what your completed code looks like, but this one doesn't.  I am not looking for anwers to a challenge, but just what I am doing wrong.

Thank you!  

Here is my code:
<apex:page standardController="Contact" recordSetVar="contacts">
    <apex:form>
    <apex:pageBlock title="Contacts List" id="contacts_list">
        
Filter:
   <apex:selectList value="{! filterid }" size="1">
       <apex:selectOptions value="{! listviewoptions }"/>    
       <apex:actionSupport event="onchange" reRender="contacts_list"/>
   </apex:selectList>        
        
        <!-- Contacts List -->
        <apex:pageBlockTable value="{! contacts }" var="ct">
            
         <!-- pagination -->
         <table style="width: 100%">
         <tr>
             <td>
                 <!-- page X of Y -->
                 page: <apex:outputText value=" {!PageNumber} of {! ceiling(resultsize / pagesize) } "/>
             </td>
             
             <td align="center">
                 <!-- Previous page -->
                 <!-- active -->
                 <apex:commandLink action="{! Previous }" value="« Previous"
                                   Rendered="{! HasPrevious }"/>    
                 <!-- inactive (no earlier pages) -->
                 <apex:outputText style="color: #ccc;" value="« Previous"
                 rendered="{! NOT(HasPrevious) }" />

&nbsp;&nbsp;
                 
                 <!-- Next page -->
                 <apex:commandLink action="{! Next }" value="Next »"
                                   Rendered="{! HasNext }"/>    
                 <!-- inactive (no earlier pages) -->
                 <apex:outputText style="color: #ccc;" value="Next »"
                 rendered="{! NOT(HasNext) }" />
                 
             </td>
             
             <td align="right">
                 <!-- Records per page -->
Records per page:
              <apex:selectList value="{! PageSize }" size="1">
                  <apex:selectOption itemValue="5" itemLabel="5"/>
                  <apex:selectOption itemValue="20" itemLabel="20"/>
                  <apex:actionSupport event="onchange" reRender="contacts_list"/>
              </apex:selectList>   
                 
             </td>
         </tr>    
          </table>
            
          <apex:column value="{! ct.firstname }"/>
          <apex:column value="{! ct.lastname }"/>
          <apex:column value="{! ct.email }"/>
          <apex:column value="{! ct.account.name }"/>
          <apex:column value="{! ct.birthdate }"/>
        </apex:pageBlockTable>
        
    </apex:pageBlock>
</apex:form>    
    
    
</apex:page>
  1. I created a visual force page and then enabled it for mobile apps. I verified that this exists and is enabled.
  2. Build> Create> Global Action I added a new Global Action, action type "Custom Visualforce" and label "Quick Account" This is saved
  3. Create > Global Action > Publisher Layout. There is only one. I override the default for SF one and added "Quick Account" for sf1 experience and saved
  4. The action does not show up at all on sf 1. I logged out and back in several times. Am I missing a step?

Create a formula field that returns an image to indicate data quality.
Sales Managers have asked for an at-a-glance solution to see completeness on leads. Create a helper formula field that looks at 5 key fields on the Lead object and evaluates their completeness, then a second formula field that references the helper formula and returns an image.The helper formula field should be on the Lead object with a name of 'Lead Quality Helper' and a resulting API name of 'Lead_Quality_Helper__c'.
The helper formula should be of type Number.
The helper formula should evaluate the following 5 fields: Email, Phone, Company, Title, and Industry and return 0 if blank and 1 if not blank. The formula should then add all the values together to return a total value.
The image formula should be on the Lead object with a name of 'Lead Quality' and a resulting API name of 'Lead_Quality__c'.
The image formula should reference the helper formula, and return an image based on the number returned by the helper formula. The helper formula should be of type Text. Note: All of these images are already available in your Developer Edition.

1 = /img/samples/stars_100.gif with alternate text '1 star'
2 = /img/samples/stars_200.gif with alternate text '2 stars'
3 = /img/samples/stars_300.gif with alternate text '3 stars'
4 = /img/samples/stars_400.gif with alternate text '4 stars'
5 = /img/samples/stars_500.gif with alternate text '5 stars'

If none of the fields are filled out, the default should be /img/samples/stars_000.gif with alternate text '0 stars'.
The 'Lead Quality' formula must be added to the Lead Layout page layout.Check Challenge


ANS:
Lead Quality (Text) =
IF(Lead_Quality_Helper__c=1, 
IMAGE("/img/samples/stars_100.gif","1 star"), IF(Lead_Quality_Helper__c=2, IMAGE("/img/samples/stars_200.gif","2 stars"), IF(Lead_Quality_Helper__c=3, 
IMAGE("/img/samples/stars_300.gif","3 stars"), 
IF(Lead_Quality_Helper__c=4, 
IMAGE("/img/samples/stars_400.gif","4 stars"), 
IF(Lead_Quality_Helper__c=5, 
IMAGE("/img/samples/stars_500.gif","5 stars"), 
IMAGE("/img/samples/stars_000.gif","0 stars"))))))


Lead Quality Helper (Number) =
IF(ISBLANK(Email),0,1)+ 
IF(ISBLANK(Phone),0,1)+ 
IF(ISBLANK(Company),0,1)+ 
IF(ISBLANK(Title),0,1)+ 
IF(ISBLANK(TEXT(Industry)),0,1)

I can't see what I am doing wrong. Everything works just fine but I keep getting this error. 
Challenge Not yet complete... here's what's wrong: 
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.


Any help will be appreciated. Thanks.
Hello,

After following the below steps and clicking save, the action "send an email" in the Publisher section doesn't show in the case feed of one of the support process. Any suggestions? Thanks

From Setup, click Customize | Cases | Page Layouts.
How you access the Case Feed Settings page depends on what kind of page layout you’re working with.

For a layout in the Case Page Layouts section, click Edit, and then click Feed View in the page layout editor.
For a layout in the Page Layouts for Case Feed Users section, click  [Case feed layout expand button]  and choose  Edit feed view. (This section appears only for organizations created before Spring ’14.)

Select Use Page Layout Editor to Configure Actions.
Click Save.
To access the page layout editor:

For a layout in the Case Page Layouts section, click Edit.
For a layout in the Page Layouts for Case Feed Users section, click  [Case feed layout expand button]  and choose Edit detail view. (This section appears only for organizations created before Spring ’14.)

In the page layout editor, click  [page layout editor change tool]  in the Actions in the Publisher section.
In the palette, click Actions.
Drag the actions you want to the Actions in the Publisher section. You can also drag actions to change the order in which they appear, and can drag off actions you don’t want. 
On the Case Feed page, up to approximately five or six actions are displayed in the publisher; the rest are included in the More drop-down list.
Click Save.