Creating Entity Dynamically in Mendix

Can we dynamically create an entity using lets say a microflow or some other mechanism in mendix ? If yes can you please advise how we can do so ? perhaps with one sample microflow to achieve this will be very helpful. Input to program/microflow will be field names and the microflow will create  The entity.  
4 answers

You cannot create entities at run time using a microflow. If you want to create entities (and other parts of your model) programatically, you can use the Mendix Platform SDK.


Don't advise you to go there, but it is possible and if you succeed, a whole new world of possibilities will open up:

You need to combine the two answers of Ockert and Rom. First create database-tables like Ockert says, then use the SDK to create a script that reads these tables and turns them into entities. This can only be done and deployed with restarting the application, so you will not get to see the entities until that has been done.


Thank you for your comments and feed back guys.


We have around 1500 Plus forms which require standard workflow approval mechanism with approve,reject, revert options. Creating each of this workflows will take several years and we have a deadline to complete this task of 3 months.
Therefor we want to build a workflow mechanism OR Use an existing one which will allow us to configure the workflow participants/actors as well as the form fields with validations etc. 

There should be a feature where we can re-configure the workflow participants/actors and the fields of a particular form at any given point in time.

Any head up on this ?


What you can do is create a meta implementation, thats a lot of effort though.

If need be you can use the database connector to write/read directly to the postgres or whatever underlying database is being used. Just use plain SQL for this, if you’re using postgres you’ll get the benifit of the JSON data type which is very dynamic in terms of what you can do.

The difficulty will be in creating you’re views, as the componentry provisioned by Mendix in this regard is pretty much static