You need to sign in to do that
Don't have an account?
How to make the VF page dynamically display a new filed which was added in the object
Hello Hi, there.... Today was working on VF page and the requirement was like this.. First of all i have a VF page which will display the data and the fields from on object.. Example assume there are two fields in the object, and lets assume these fields are Name, Age...Now if i run the VF page it will display name and age fields and the data stored in that object... But what i want to do is--- I want to display the new field called Address on a VF page as soon as i go and add this(address) field in the object through set up menu.. Is this possible!!!... I will be glad with any help and i would thank them advance for it:)
You can use schema classes of API to get information about schema of SObject, and can get this information at runtime,
Example:
Map<String, Schema.SObjectField> M = Schema.SObjectType.Account.fields.getMap(); // Get the all fields information of account
Set<String> fields=new Set<String>();
fields=M.keySet(); // This set contains all account's fields name