Skip to content

Instantly share code, notes, and snippets.

@ohadios
ohadios / ContactQuery.vfp
Created December 13, 2016 03:24
Webinar 11 - VisualForce
<apex:page controller="ContactQueryController" showHeader="true">
<apex:form >
<apex:pageBlock title="Query Objects">
<apex:pageBlockSection columns="1">
<apex:selectList title="" size="1" value="{!selectedObject}" >
<apex:selectOptions value="{!objectNames}"/>
<apex:actionSupport event="onchange" reRender="fieldSelection"/>
<apex:outputLabel >Select the object you would like to query</apex:outputLabel>
</apex:selectList>
</apex:pageBlockSection>
@sbob909
sbob909 / gist:1886593
Created February 22, 2012 18:44
Sample Data for Apex Workbook Spring 2012
Merchandise__c[] ml = new List<Merchandise__c>();
Merchandise__c m = new Merchandise__c(
Name='Pencils',
Description__c='Cool pencils',
Price__c=1.5,
Total_Inventory__c=1000);
ml.add(m);
Merchandise__c m2 = new Merchandise__c(
Name='Notebooks',
Description__c='Blue notebooks',