Skip to content

Instantly share code, notes, and snippets.

View nithesh1992's full-sized avatar

Nithesh Nekkanti nithesh1992

View GitHub Profile
<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>
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();
}
@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>
@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 / 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 / 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 / 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 / Get Session ID
Created November 16, 2017 16:43
Get Session Id Salesforce in JS Console
document.cookie.match(/(^|;\s*)sid=(.+?);/)[2];
@nithesh1992
nithesh1992 / SFDX Commands.md
Created November 28, 2017 16:13
SFDX Commands

Logging in

sfdx force:auth:web:login --setalias <sandbox name> --instanceurl https://test.salesforce.com

Org List

sfdx force:org:list
@nithesh1992
nithesh1992 / AutoDocGeneration_Mergefields.js
Last active September 13, 2018 13:15
Google Apps Scripts (Auto G Doc to PDF conversion and Email Scripts)
// Row number from where to fill in the data (starts as 1 = first row)
var CUSTOMER_ID = 2; // 1st row may contains column headers
// Google Doc id from the document template
// (Get ids from the URL)
var SOURCE_TEMPLATE = "sdsv";
// In which spreadsheet we have all the customer data
var CUSTOMER_SPREADSHEET = "svs";