+ Start a Discussion
tganikumartganikumar 

Apex code to create(add) custom fields to the object dynamically

Hi,

i am developing one visualforce page, which is showing custom fied values of one object. if i given one field value as 3 then 3 columns added to the visualforce page dynamically. But, in visualforce page i taken string variable  for that column values, based on field value the string value is repeating.

 

My question is :

 

after giving the values in visualforce page where i want to store these column values backend? for that purpose what vl i do? 

Jia HuJia Hu
Based on my understanding, you can't add custom field in the Apex.
tganikumartganikumar

why? and is there anything else to do for this purpose?

Jia HuJia Hu
DML in Apex is used for data operation, not for metadata operation.
tganikumartganikumar

can you give me some example for this requirement?