function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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 ='');

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

You actually miss the initial markup. You can find, here: .

Good lucks!