Tuesday, May 26, 2015

Schema.DescribeSObjectResult in Apex and its usage in visualforce.

Schema.DescribeSObjectResult in Apex and its usage in visualforce. This Describes SObject methods returns an array of DecribeSobjectResult objects. Where each object has the following properties. String Name : This is the name of the object. String Label :  Label text for the tab or an objct. String LabelPlural : Label text for an object that represents plural version of object name. String keyPrefix :  Object id's are prefixed with 3 character quotes that specify the type of the object. Ex: - Account obj as 001, Opportunity object has 006. When we call the keyPrefix it will return...

Sunday, May 24, 2015

Schema Programming in Apex and its usage in Visualforce Page.

Schema Programming in Apex and its usage in Visualforce Page. Schema give the meta data information about the data (Object, Fields). Schema Methods : 1). public static Map<String, Schema.SObjectType> getGlobalDescribe()      This method returns a map of all the Sobject names as keys and Sobject val tokens as Values. Ex: Display all the list of objects available in the salesforce organization in the Visualfoce page. Controller Class: public class SchemaDescribeExample {     public List<SelectOption> options;          public list<SelectOption> getOptions(){         return options;     }          public SchemaDescribeExample(){        ...

Saturday, May 23, 2015

How to Use Select options in Visualforce page?

How to Use Select options in Visualforce page? Selectoption object specifies one of the possible values for visualforce select checkboxes, select list, select radio component. It consist of label that is displayed to the end user, and the value that will be written to the controller. Note:- The SelectOption can be displayed in the disable state. Constructors: We have 2 types of constructors in this class Instantiating  SelectOption one = bew SelectOpton (value(String), label(String), IsDisabled(true/false)); If isDisabled is true, the option is disabled . We can not select that value. SelectOption one = new SelectOption(value,...
Page 1 of 10312345Next

 
| ,