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="ObjectQueryController" showHeader="true"> | |
<apex:form > | |
<apex:pageBlock title="Query Objects"> | |
<apex:pageBlockSection columns="1" title="Object Selection"> | |
<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> |
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="ObjectQueryController" showHeader="true"> | |
<apex:form > | |
<apex:pageBlock title="Query Objects"> | |
<apex:pageBlockSection columns="1" title="Object Selection"> | |
<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> |
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="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> |
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
String myStr = stringUtil.toAlternate('THis is a test'); | |
system.debug(myStr); | |
String typeName; | |
typeName = stringUtil.returnTypeName(date.today()); | |
System.Debug(typeName); | |
typeName = stringUtil.returnTypeName('I do words'); | |
System.Debug(typeName); |
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
@isTest (seeAllData = true) | |
public class SOQLqueries { | |
static testMethod void SOQLandCollections(){ | |
//This only works when this test Class is set to SeeAllData=True! | |
List<Account> accts = [SELECT ID FROM Account]; | |
System.debug(accts.size()); | |
System.debug(accts); | |
//System.debug(accts[0].Name);//This won't work because Name was not acquired in the query. | |
accts = [SELECT ID, Name, Phone, BillingState FROM Account]; |