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
public with sharing class DynamicSOQLPractice { | |
public static void getAccountFieldsDynamically(){ | |
String allFields = ''; | |
List<Account> allAccounts; | |
Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.Account.fields.getMap(); | |
for(Schema.SObjectField singleField : fieldMap.values()){ | |
allFields = allFields + ',' + singleField.getDescribe().getName(); | |
} | |
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
//queryString is the String containing the actual SOQL statement | |
List<sObject> allData = Database.query(queryString); |
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="HouseHoldController" showChat="false" sidebar="false" showHeader="false"> | |
<head> | |
<title>Leaflet Draw</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.2.0/mapbox.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.2.0/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> |
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 showHeader="true" standardStylesheets="false" sidebar="false"> | |
<html> | |
<head> | |
<meta charset="urf-8"/> | |
<title> First Mapbox Map</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=mo' /> | |
<script src='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js'></script> | |
<link href='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.css' rel='stylesheet' /> | |
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 showHeader="true" standardStylesheets="false" sidebar="false"> | |
<html> | |
<head> | |
<meta charset="urf-8"/> | |
<title> First Mapbox Map</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=mo' /> | |
<script src='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js'></script> | |
<link href='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.css' rel='stylesheet' /> | |
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="SingleController"> | |
<apex:pageBlock> | |
Welcome {!name} | |
</apex:pageBlock> | |
</apex:page> |
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="SingleController"> | |
<apex:form> | |
<apex:pageBlock> | |
<apex:pageBlockSection columns="2"> | |
<apex:outputText value="Enter your name"></apex:outputText> | |
<apex:inputText id="nameId" value="{!name}"/> | |
</apex:pageBlockSection> | |
<apex:pageBlockSection columns="2"> | |
<apex:commandButton id="buttonId1" action="{!goToSecondPage}" value="Enter"/> | |
</apex:pageBlockSection> |
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
public class SingleController { | |
public String name { | |
get; | |
set{ | |
name = value; | |
System.Debug(LoggingLevel.INFO,'Inside setter Name: ' + value); | |
} | |
} | |
public PageReference goToSecondPage(){ |
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
public class AccountTriggerHandler { | |
//After Insert Handler | |
public class AccountAfterInsertHandler implements MyTriggers.Handler{ | |
public void handle(){ | |
System.Debug(LoggingLevel.INFO,'Inside AccountAfterInsertHandler'); | |
} | |
} | |
//Before Insert Handler | |
public class AccountBeforeInsertHandler implements MyTriggers.Handler{ |
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
public class AccountTriggerHandler { | |
//After Insert Handler | |
public class AccountAfterInsertHandler implements MyTriggers.Handler{ | |
public void handle(){ | |
System.Debug(LoggingLevel.INFO,'Inside AccountAfterInsertHandler'); | |
} | |
} | |
//Before Insert Handler | |
public class AccountBeforeInsertHandler implements MyTriggers.Handler{ |