+ Start a Discussion
Ankit Chauhan 10Ankit Chauhan 10 

Not able to build lightning app from trailhead link!! any help?

Hi All,

I'm trying a lightning trailhead link to implement the Tile view for contact. But even after coding the same in VF page I'm unable to see any results upon Preview. Please help.


Here is my code- (which is same as mentioned in the trailhead)

<apex:page >

  This is your new Page

  (function() {
    var contact = new SObjectModel.Contact();
    var contactList = document.getElementById('contact-list');

    function createTile (record) {
      return [
        '<li class="slds-item">',
          '<div class="slds-tile slds-media">',
            '<div class="slds-media__body">',
              '<h3 class="slds-truncate" title="', record.get('Name'), '"><a href="javascript:void(0);">', record.get('Name') ,'</a></h3>',
              '<div class="slds-tile__detail slds-text-body--small">',
                '<p class="slds-truncate">', record.get('Title') ,'</p>',

      { orderby: [{ LastModifiedDate: 'DESC' }], limit: 10 },
      function(error, records) {
        if (error) {
        } else {
          contactList.innerHTML = records.map(createTile).join('');

Best Answer chosen by Ankit Chauhan 10
Onur Caglayan 10Onur Caglayan 10
Hi Ankit,

You actually miss the initial markup. You can find, here: https://trailhead.salesforce.com/en/project/workshop-lightning-design-system-visualforce/slds-vf-02-create-page .

Good lucks!