+ Start a Discussion
mkr mkrmkr mkr 

when a trigger fire can we create a new field? like if we create a trigger on account a filed create automaticaly

hi mkr mkr,

I think you are referring to using Metadata API from Apex. Currently, it is not possible from standard Salesforce. However, there is an Apex Wrapper written for it. Take a look at this https://github.com/financialforcedev/apex-mdapi.

Please mark this answer as best, if it resolved your query.
SandhyaSandhya (Salesforce Developers) 

You can do that by using the metadata API and a web service.Refer below links.

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
mkr mkrmkr mkr
sorry i want just from trigger only can it possible?
there may be other chance through mata data or page layout any thing but i want it from trigger
The trigger will execute Apex code, right.

Here you can use the Metadata Wrapper I mentioned to write code that would create the field on the object.