Skip to content

Instantly share code, notes, and snippets.

View JitendraZaa's full-sized avatar

Jitendra Zaa JitendraZaa

View GitHub Profile
@JitendraZaa
JitendraZaa / Winter18.page.xml
Created September 6, 2017 02:31
Winter 18 - Automatic Styling of Visualforce Pages in Lightning Experience
<apex:page standardController="Contact" recordSetVar="contacts"
lightningStylesheets="true">
<apex:outputPanel >
<apex:form >
<apex:pageBlock title="Contacts List" id="contacts_list">
<apex:outputLabel value="Filter: " for="filterList" />
<apex:selectList value="{! filterId }" size="1" id="filterList">
<apex:selectOptions value="{! listViewOptions }"/>
<apex:actionSupport event="onchange" reRender="contacts_list" oncomplete="init();"/>
</apex:selectList>
@JitendraZaa
JitendraZaa / ReadOnlyChevron.cmp.html
Last active January 21, 2022 19:23
Salesforce Path - Read Only Lightning Component
<aura:component controller="ReadOnlyChevronController" implements="force:hasRecordId, flexipage:availableForAllPageTypes">
<aura:handler name="init" value="{!this}" action="{!c.loadChevron}"/>
<aura:attribute name="fieldName" Description="API Name of Picklist Value" type="String" />
<aura:attribute name="recordId" type="Id" description="Id of record on which this component is hosted." />
<aura:attribute name="records" type="object[]" description="Records for Chevron calculated by Apex class" access="private" />
<div style="width:100%" class="slds-align_absolute-center">
<div class="chevron noaction">
<aura:iteration items="{!v.records}" var="item" indexVar="i">
<a href="#" class="{#item.cssClass}" style="{! 'width:'+item.width}">
<aura:if isTrue="{!item.cssClass == 'visited'}">
@JitendraZaa
JitendraZaa / ChevronCompDemo.app.html
Created September 17, 2017 21:14
Test Chevron Component
<aura:application extends="force:slds">
<c:ReadOnlyChevron fieldName="status" />
</aura:application>
//Anonymous Apex to test code
RunTerritoryRules job = new RunTerritoryRules() ;
job.accntIds = new Set<String>{'001B000000Y0Gyv','001B000000Y0GsJ'};
System.enqueueJob(job);
@JitendraZaa
JitendraZaa / Tambola.html
Created September 25, 2017 01:27
Free online Tambola Game
<html>
<head>
<title>
Tambola Game - By Jitendra Zaa
</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:type" content="article" />
<meta property="og:title" content="Online free Tambola Game - By Jitendra Zaa" />
@JitendraZaa
JitendraZaa / SessionIdHack.html
Last active September 28, 2017 01:15
How to get Salesforce SessionId in future Method, Batch Apex or any other Async Apex - http://www.jitendrazaa.com/blog/salesforce/enterprise-territory-management-auto-account-assignment-using-apex/
<apex:page contentType="text/plain" >{!$Api.Session_Id}</apex:page>
@JitendraZaa
JitendraZaa / Screen1.html
Created October 21, 2017 18:11
Create Breadcrumb Or Chevron Control in Flow
<div>
<a href="/flow/Breadcrumb?stepNumber=1" target="_self">
<img src="/resource/1507766397000/ChevronImages/Page1Blue.png" alt="Page1" style="width:100px;height:40px;" />
</a>
<a href="/flow/Breadcrumb?stepNumber=2" target="_self">
<img src="/resource/1507766397000/ChevronImages/Page2Gray.png" alt="Page2" style="width:100px;height:40px;margin-left:-20px;" />
</a>
<a href="/flow/Breadcrumb?stepNumber=3" target="_self">
<img src="/resource/1507766397000/ChevronImages/Page3Gray.png" alt="Page3" style="width:100px;height:40px;margin-left:-20px;" />
</a>
@JitendraZaa
JitendraZaa / TrailheadWidget.html
Last active April 5, 2020 14:09
Trailhead Widget for Websites
<div id="trailhead-widget-container">
<img src="https://jitendrazaa.com/loading.gif" />
</div>
<script async src="https://jitendrazaa.com/Trailhead.php?profileId=00550000007SGlRAAW" type="text/javascript"> </script>
myChart.showLoading();
$.getJSON('https://gist.githubusercontent.com/JitendraZaa/af6b3fafed1b9c72a64cb4eb4bed3ab3/raw/b91453c2a060686481ce8d17025af7228f84a0d5/ESGraphDemo.json', function (json) {
myChart.hideLoading();
myChart.setOption(option = {
title: {
text: 'Demo Mind Mapping'
},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series : [
@JitendraZaa
JitendraZaa / Sync Method.java
Created March 1, 2018 01:57
Salesforce Connect - Custom Adapter - Sync Method
private String EXTERNAL_SRC_URL = 'https://www.healthcare.gov/api/blog.json';
private final String EXTERNAL_SRC_BASEURL = 'https://www.healthcare.gov';
private final String COL_HEADER_TITLE = 'title';
private final String COL_HEADER_SEO_KEYWORDS = 'seo-keywords';
private final String COL_HEADER_EXCERPT = 'excerpt';
private final String COL_HEADER_CONTENT = 'content';
private final String COL_HEADER_LANGUAGE = 'lang';
private final String COL_HEADER_BLOGLINK = 'url';
private final String COL_HEADER_DISPLAYURL = 'DisplayUrl';
private final String COL_HEADER_EXTERNAL_ID = 'ExternalId';