View searchmetadata
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="searchMetadataCntrl" 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="Result" type="Object"/> | |
<aura:attribute name="metadataType" type="string[]"/> | |
<aura:attribute name="selectedMetadata" type="string"/> | |
<aura:attribute name="searchKeyword" type="string"/> | |
<aura:attribute name="unFilteredResult" type="object"/> | |
<aura:handler event="aura:waiting" action="{!c.showSpinner}"/> | |
<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/> | |
<aura:attribute name="Spinner" type="boolean" default="false"/> |
View searchmetadataJS
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) { | |
var type=['ApexClass & ApexTrigger','ValidationRule','WorkflowRule','VisualforcePages','Static Resource','Email Template','Documents','Visualforce Component']; | |
component.set("v.metadataType",type); | |
component.set("v.selectedMetadata",'ApexClass & ApexTrigger'); | |
helper.GetSearchedData(component,event,helper); | |
}, | |
OnSelectChange:function(component,event,helper){ | |
var selected=event.getSource().get("v.value"); | |
console.log('selectted: ' +selected); |
View searchmetadataHelper
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
({ | |
GetSearchedData : function(component,event,helper) { | |
var action=component.get("c.GetMetaData"); | |
var selectedType=component.get("v.selectedMetadata"); | |
action.setParams({ | |
"type": component.get("v.selectedMetadata") | |
}); | |
action.setCallback(this,function(response){ | |
var state=response.getState(); | |
if(state=='SUCCESS'){ |
View searchmetadataCss
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
.THIS .changeMe{ | |
display: ""; | |
color:red; | |
background-color:yellow; | |
} | |
.THIS .ul_list{ | |
padding:10px; | |
} | |
.THIS .slds-page-header { | |
border-radius: 0px; |
View UtilsClass
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
global class UtilsClass { | |
global static String getSessionIdFromVFPage(PageReference visualforcePage){ | |
String content = visualforcePage.getContent().toString(); | |
Integer s = content.indexOf('Start_Of_Session_Id') + 'Start_Of_Session_Id'.length(), | |
e = content.indexOf('End_Of_Session_Id'); | |
system.debug('Session ID: ' + content.substring(s, e)); | |
return content.substring(s, e); | |
} | |
} |
View SessionIdPage
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 > | |
Start_Of_Session_Id{!$Api.Session_ID}End_Of_Session_Id | |
</apex:page> |
View searchMetadataCntrl
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: ToolingCntrl | |
* Description: This Apex class makes callout to Salesforce Tooling Api and get the metadata information about the objects. | |
* Created By: Arun Kumar | |
*/ | |
public class searchMetadataCntrl { | |
@AuraEnabled | |
public static string GetMetaData(string type){ | |
HttpRequest req = new HttpRequest(); |
View ContractPDF
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 controller="ContractPDFCntrl" sidebar="false" showHeader="false" applyBodyTag="false" renderAs="PDF"> | |
<html> | |
<head> | |
</head> | |
<body> | |
<table style="border-collapse: collapse; "> | |
<apex:repeat value="{!wrapperList}" var="row"> | |
<tr style="border: 1px solid rgb(221, 219, 218); width:700px;"> | |
<apex:repeat value="{!row.values}" var="value"> | |
<td style="border: 1px solid rgb(221, 219, 218); padding: 15px; ">{!value}</td> |
View RecordList.cmp
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="ListComponentCntrl" 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="data" type="Contact[]" /> | |
<aura:attribute name="UnfilteredData" type="Contact[]" /> | |
<aura:attribute name="filter" type="String" /> | |
<aura:handler name="change" value="{!v.filter}" action="{!c.doFilter}" /> | |
<div class="slds-page-header">My Contacts</div> | |
<lightning:input name="x" value="{!v.filter}" label="Filter" placeholder="Search Contact by "/> | |
<table class="slds-table slds-table--bordered"> | |
<thead> |
View JS Controller
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){ | |
// Apex method definition | |
var action = component.get("c.loadData"); | |
// callbak function | |
action.setCallback(this,function(response){ | |
//get state | |
var state = response.getState(); | |
// check if state is 'SUCCESS' | |
if(state == 'SUCCESS'){ |
OlderNewer