Skip to content

Instantly share code, notes, and snippets.

View shivanathd's full-sized avatar

Shivanath Devinarayanan shivanathd

View GitHub Profile
/* PRE - model declaration on vf page
<apex:remoteObjects>
<apex:remoteObjectModel name="Account" fields="Id,Name" />
</apex:remoteObjects>
*/
/* INSTANCE */
// 1. W/o default properties
var acc = new SObjectModel.Account();
global class MortgageCalculator implements Process.Plugin
{
global Process.PluginResult invoke(Process.PluginRequest request)
{
Double amount = (Double)request.inputParameters.get('Amount');
Double term = (Double)request.inputParameters.get('Term');
// in addition to to adding the calculation below, to use this in the Visual Workflow Workbook, tutorial #3,
// a third input called "Rate" will need to be defined for the calculate quote step: the screen input field "Interest_Rate".
Double rate = (Double)request.inputParameters.get('Rate');
Double monthlyrate = rate/(12*100);
<apex:page standardController="Account" contenttype="application/vnd.ms-excel">
@shivanathd
shivanathd / VFtoExcel
Created March 13, 2013 20:08
Visualforce to Excel sheet
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
@shivanathd
shivanathd / VFtoExcel
Created March 13, 2013 20:08
Visualforce to Excel sheet
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
@shivanathd
shivanathd / VFtoExcel
Created March 13, 2013 20:08
Visualforce to Excel sheet
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
@shivanathd
shivanathd / VFtoExcel
Created March 13, 2013 20:08
Visualforce to Excel sheet
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
@shivanathd
shivanathd / VFtoExcel
Created March 13, 2013 20:08
Visualforce to Excel sheet
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
<apex:page docType="html-5.0"
showHeader="false" sidebar="false"
standardController="Account">
<!--c:RemoteTK /-->
<apex:stylesheet value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery-1.9.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'ForceTk.js')}"/>
<head>
<title>Accounts</title>
<apex:page docType="html-5.0"
showHeader="false" sidebar="false"
standardController="Account">
<!--c:RemoteTK /-->
<apex:stylesheet value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery-1.9.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'ForceTk.js')}"/>
<head>
<title>Accounts</title>