Posts

Showing posts from January, 2019

Salesforce : Custom Related List

Image
Salesforce : Custom Related List LightningTaskAndEventController (Apex Controller ) public class LightningTaskAndEventController { @AuraEnabled public static List<Contact> fetchTaskandEvent(String contactId) { List<Contact> lstContact=new List<Contact>(); lstContact=[select id ,Name,Email,(select WhatID,Owner.Name,ActivityDate,Description,id,subject from tasks order by ActivityDate desc limit 5) from contact where id=:contactId]; return lstContact; } } LightningTaskAndEvent.cmp (Component) <aura:component controller="LightningTaskAndEventController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > <aura:handler name="init" value=&q