View OpptyCloseTimerCmp
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="OpptyCloseTimerCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:attribute name="second" type="string"/> | |
<aura:attribute name="minute" type="string"/> | |
<aura:attribute name="hour" type="string"/> | |
<aura:attribute name="day" type="string"/> | |
<aura:attribute name="msg" type="String"/> | |
<aura:attribute name="isValid" type="Boolean" default="false"/> | |
<div class="slds"> | |
<div class="slds-page-header"> |
View ViewAccountHeirarchyController
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
({ | |
navigateToAccountHierarchy: function(cmp, event, helper) { | |
var acctId = cmp.get('v.recordId'); | |
var evt = $A.get("e.force:navigateToComponent"); | |
evt.setParams({ | |
componentDef: "sfa:hierarchyFullView", | |
componentAttributes: { | |
recordId: acctId, | |
sObjectName: "Account" | |
} |
View ContentDocumentLink_Trigger
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
trigger ContentDocumentLink_Trigger on ContentDocumentLink (after insert) { | |
if(Trigger.isAfter && Trigger.isInsert){ | |
Set<ID> contentDocIds = new Set<ID>(); | |
for(ContentDocumentLink cdl: Trigger.new){ | |
contentDocIds.add(cdl.ContentDocumentId); | |
} | |
Set<Id> eventIds = new Set<Id>(); | |
Map<String,String> eventMap = new Map<String,String>(); |
View ContentDocumentLink_TriggerHelper
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 ContentDocumentLink_TriggerHelper { | |
public static Boolean flag = true; | |
public static void shareFile(List<ContentDocumentLink> cdlLink){ | |
try{ | |
insert cdlLink; | |
} | |
catch(Exception e){ | |
system.debug('Exception has occured ! ' +e.getMessage()); | |
} | |
} |
View NEWSAPI_Callout
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
string baseURL='https://newsapi.org/v2/top-headlines'; | |
String apiKey =''; //API key get it from Newsapi.org | |
HttpRequest reqest = new HttpRequest(); | |
system.debug('EndPoint: '+baseURL+'?sources=national-geographic&apiKey='+apiKey); | |
reqest.setEndpoint(baseURL+'?sources=national-geographic&apiKey='+apiKey); | |
reqest.setMethod('GET'); | |
reqest.setHeader('Accept','application/json'); | |
Http h = new Http(); | |
HTTPResponse response = h.send(reqest); | |
System.debug('result : + response.getBody()); |
View NewsApp
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
<apex:page showHeader="false" sidebar="false"> | |
<apex:includeLightning /> | |
<div id="LightningCompDisplayId"></div> | |
<script> | |
//please note that you need to create a lightning application and need to put the main component uder this app. | |
/* <aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess"> | |
<aura:dependency resource="c:News"/> | |
<c:News /> |
View COVID19_IND_LtngApp
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:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess"> | |
<aura:dependency resource="c:Covid19_IND_Tracker"/> | |
<c:Covid19_IND_Tracker /> | |
</aura:application> |
View Covid19_Tracker_App
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
<apex:page showHeader="false" sidebar="false"> | |
<apex:includeLightning /> | |
<div id="LcDisplayId"></div> | |
<script> | |
$Lightning.use("c:Covid19_IND_TrackerApp", function() { | |
$Lightning.createComponent("c:Covid19_IND_Tracker", |
View Covid19_Tracking_ChartHelper
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
({ | |
CreateChart : function(component) { | |
var chartType= 'bar'; | |
var action=component.get("c.fecthCovid19Data"); | |
action.setCallback(this,function(response){ | |
var state=response.getState(); | |
if(state=='SUCCESS'){ | |
var result = JSON.parse(JSON.stringify(response.getReturnValue())); | |
console.log('result : ' +JSON.stringify( result)); | |
var data = []; |
View Covid19_Tracking_ChartController
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) { | |
helper.CreateChart(component); | |
} | |
}) |
NewerOlder