Skip to content

Instantly share code, notes, and snippets.

View nithesh1992's full-sized avatar

Nithesh Nekkanti nithesh1992

View GitHub Profile
@nithesh1992
nithesh1992 / Mortgage.vfp
Created May 14, 2017 05:32
Mortgage Calculator template in Visualforce (In lightning style)
<apex:page showHeader="false" sidebar="false">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<apex:slds /> <!-- SLDS style sheet -->
</head>
<body>
@nithesh1992
nithesh1992 / componentEvent.evt
Created May 10, 2017 19:34 — forked from pozil/componentEvent.evt
Lightning - Passing data up the component hierarchy via a component event
<aura:event type="COMPONENT">
<aura:attribute name="param" type="String"/>
</aura:event>
@nithesh1992
nithesh1992 / Copy.txt
Created May 3, 2017 18:21
Visualforce Copy to CLIPBOARD
<apex:page title="Clipboard Test" >
<apex:messages />
<script language="JavaScript">
function ClipBoard(copytextid, holdtextid){
copyToClipboard(copytextid);
}
function copyToClipboard(elementId) {
// Create an auxiliary hidden input
var aux = document.createElement("input");
// Get the text from the element passed into the input
@nithesh1992
nithesh1992 / AccountUpdateIntegration.apxc
Created May 2, 2017 07:27
Informatica Cloud REST Class
public with sharing class AccountUpdateIntegration {
@future (callout=true)
public static void runjob(String username, String password, String jobName, String jobType) {
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();
@nithesh1992
nithesh1992 / livechat.html
Created May 1, 2017 22:04 — forked from soe/livechat.html
sample page on how to include Salesforce Live Agent button code and deployment code
<html>
<body>
<!-- live chat button -->
<a id="liveagent_button_online_573i00000004DD7" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573i00000004DD7')">
Online Chat
</a>
<div id="liveagent_button_offline_573i00000004DD7" style="display: none;">
Offline Chat
</div>
public class PricebookExt {
public List<PricebookEntry> productList = new List<PricebookEntry>();
public PricebookEntry entry;
public Boolean IsReady = false;
public integer total_products;
public PricebookExt(ApexPages.StandardController stdController) {
this.entry = (PricebookEntry)stdController.getRecord();
}
<apex:page standardController="PricebookEntry" extensions="PricebookExt" showHeader="false" sidebar="false">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>PriceBook Review</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<apex:slds /> <!-- SLDS style sheet -->
<style>
<apex:page standardController="Lead">
<apex:pageBlock title="Lead Conversion Status!" id="LeadBlock">
<apex:pageBlockSection title="Lead Details">
<apex:outputField value="{!lead.ConvertedContactId}"/>
<apex:outputField value="{!lead.Status}"/>
<apex:outputField value="{!lead.ConvertedAccountId}"/>
<apex:outputField value="{!lead.Id}"/>
<apex:outputField value="{!lead.ConvertedOpportunityId}"/>
</apex:pageBlockSection>
</apex:pageBlock>
public class ConvertExt {
public Lead lead = new Lead();
public Id Lid, accId, conId, oppId;
public Boolean isConverted = false;
public ConvertExt(ApexPages.StandardController stdController){
Lid = (Id)stdController.getRecord().id;
lead = (Lead)stdController.getRecord();
<apex:page standardController="Lead" extensions="ConvertExt" sidebar="false">
<apex:pageBlock title="Custom Lead Conversion" tabStyle="Lead" id="LeadBlock">
<apex:pageBlockSection title="Lead Details">
<apex:outputField value="{!lead.LastName}"/>
<apex:outputField value="{!lead.OwnerId}"/>
<apex:outputField value="{!lead.Company}"/>
<apex:outputField value="{!lead.Id}"/>
<apex:outputField value="{!lead.Status}" id="leadStatus"/>
</apex:pageBlockSection>
<apex:form >