+ Start a Discussion
Deepak PansariDeepak Pansari 

Creating a custom field via backend code ?

Hi All,


Is there any way to create custom field via code like apex code or Webservice.


Can some one guide me.







It can be done through metadata APIs. Refer below document for more information.




Hope this helps.



Kamlesh Chauhan, (Founder & CTO)

LogicRain Technologies, (Salesforce and Force.com Development Division)

Cellular: +91-(997) 476-6800 Office: (732) 676-6400 Skype:kamlesh.logicrain

kamlesh@logicrain.com || http://www.logicrain.com || LinkedIn


Answers/Suggestions are my own.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.



Deepak PansariDeepak Pansari

Hi Kamlesh,


Thanks for reply.. I want to know if we can use META data API with Apex code?


- Deepak 


Could I ask why you would want to do this? What is your actual requirement?

Deepak PansariDeepak Pansari

Yes John,


I have a picklist and when a new value is added to that picklist .. then i want to create field of that picklist value ..


- Deepak