You need to sign in to do that
Don't have an account?
p_282
Dynamically getting the values in javascript
How to get the values dyamically in javascript using visualforce page?
I have some fields like
Date
Reference
Subject..
and also had a table and the table includes product,description ,quantity...
Apex code to get fields is
objectFields = new List<String>();
Map<String , Schema.SObjectType> globalDescription = Schema.getGlobalDescribe();
Schema.sObjectType sObjType = globalDescription.get(searchCategory);
sObjectToBind = sObjType.newSObject();
Schema.DescribeSObjectResult r1 = sObjType.getDescribe();
Map<String , Schema.SObjectField> mapFieldList = r1.fields.getMap();
for(Schema.SObjectField field : mapFieldList.values())
{
Schema.DescribeFieldResult fieldResult = field.getDescribe();
if(fieldResult.isAccessible())
{
objectFields.add(fieldResult.getName());
}
}
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
If this post is your solution, kindly mark this as the solution.
Thanks for the post ..i need that in javascript
I have the same scenario where i need to use schema methods in javascript. Could you please help if you have any piece of code.
Thanks,
pRAMODH.