Skip to main content


Showing posts from November, 2013

Screaming for XMLStreamReader!!

I am studying on how to extract data from xml file.Actually I need to learn it for my project requirement.So I googling around and found these nice links. http:// Some of it using XMLStreamReader and some using XMLNode .But I choose to use XMLStreamReader.Why? I think it enough for my project requirement and for this time being I am able to understand XMLStreamReader better. If you refer to links above, most of it giving simple XML which only contain one element.During my self study, I am trying to read XML file whereby the element contains sub elements such as below <user xmlns:i= "" > <id> 2262 </id> <displayname> Unidha </displayname> <email> </email> <usergroups> <usergroup><id> 301 </id><name> Administrators </name></use

Getting value from Custom Setting

I figured out how to getting value from custom setting. I know, I am too slow! :) . The purpose of custom setting can be read here .But my purpose is to store the Application configuration such as Key.In java , maybe I will store I create Custom Setting with details value: Label : Application Config Object Name: Application_Config__c  Setting Type : List  [Please go to here for more knowledge on List/Hierarchy differences] Visibility:Protected [I choose it by default] Once created, you will able to create custom fields.Last time I tried to create Name field without realize Name is default field. For this , I create one field named Value with API name Value__c . I inserted the data with Name : App_Name and Value__c : Health Monitoring . I just test in Apex Execute : String str1=Application_Config__c.getValues('App_Name').Value__c; system.debug('unid -'+str1); So that is how we can call custom setting value. Thanks.