This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
FilterRecords: function(component) { | |
//data showing in table | |
var data = component.get("v.data"); | |
// all data featched from apex when component loaded | |
var allData = component.get("v.UnfilteredData"); | |
//Search tems | |
var searchKey = component.get("v.filter"); | |
// check is data is not undefined and its lenght is greater than 0 | |
if(data!=undefined || data.length>0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ListComponentCntrl { | |
@AuraEnabled | |
public static List<Contact> loadData(){ | |
List<Contact> conList = [select Id,Name,Email from Contact order by Name asc]; | |
return conList; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Name: UploadImages | |
Decription: Upload images in files object and show them on richtex field on record. | |
Created Date: 17/03/2019 | |
LastModified Date: 17/03/2019 | |
Created By: Arun Kumar | |
--> | |
<apex:page controller="uploadImageCntrl" sidebar="false"> | |
<html> | |
<head> | |
<apex:slds /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Name: uploadImageCntrl | |
Description: Upload files and show image in richtext field on object record page. | |
Created Date: 17/03/2019 | |
LastModified Date: 17/03/2019 | |
Created By: Arun Kumar | |
*/ | |
public with sharing class uploadImageCntrl { | |
public transient Blob imageFile{get;set;} | |
public string parentRecId =''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="copyToClipboardCntrl" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" > | |
<aura:attribute name="recordId" type="string" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<aura:attribute name="wrapperObj" type="Object"/> | |
<div class="slds"> | |
<div class="slds-grid"> | |
<div class="slds-col slds-size--12-of-12"> | |
<div class="slds-page-header" style="border-radius: 0px; border-right: 0px;border-left: 0px;border-top: 0px; | |
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.1);"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit : function(component, event, helper) { | |
//get the object details from apex | |
helper.getsObjectName(component,event,helper); | |
}, | |
copyLink:function(component,event,helper){ | |
//dynamically creating html component | |
var hiddenInputEle = document.createElement("input"); | |
//get the title of clicked element (record link) | |
let val = event.getSource().get("v.title"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
getsObjectName : function(component, event, helper) { | |
let action = component.get("c.fetchsObjectDetails"); | |
action.setParams({ | |
"recId" : component.get("v.recordId") | |
}); | |
action.setCallback(this,function(response){ | |
let state = response.getState(); | |
if(state == 'SUCCESS'){ | |
let result = response.getReturnValue(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Name:copyToClipboardCntrl | |
* Description: This Apex class retrieve the sObject details such as Name, record link from database. | |
* Created Date: 01/05/2019 | |
* LastModified Date:01/05/2019 | |
* Created By: Arun Kumar | |
* Version: 1.0 | |
*/ | |
public class copyToClipboardCntrl { | |
@AuraEnabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Name:copyToClipboardCntrl | |
* Description: This Apex class retrieve the sObject details such as Name, record link from database. | |
* Created Date: 01/05/2019 | |
* LastModified Date:01/05/2019 | |
* Created By: Arun Kumar | |
* Version: 1.0 | |
*/ | |
public class copyToClipboardCntrl { | |
@AuraEnabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Name:MCSubscribeUnsubscribeTrg | |
* Description: On contact record insert/update subscribe/unsubscribe member in Mailchimp list. | |
* Created Date: 05/05/2019 | |
* Last ModifiedDate : 05/05/2019 | |
* Created By: Arun Kumar | |
*/ | |
trigger MCSubscribeUnsubscribeTrg on Contact (after insert, after update) { | |
if(trigger.isAfter && trigger.isUpdate){ | |
system.debug('Contact Email has Opted Out: '); |