How Can I Clone (Replicate/Duplicate) my Nonpersistent Entity to Persistent Entity

0
Hello folks, Can you please help me with my below 2 requirements! Scenario1: I have a Non persistent entity (a form) which need to be replicated/duplicated into a new object, where I can use that entity as completely a different new object (as a new form). I would like to achieve this scenario using a microflow. Scenario2: Also, I have an existing date field (contains the DATE of past day) in my non persistent entity, which need to replace with the CURRENT DATE in my new form. Appreciate if someone can assist me achieving this, thank you in advance. Regards, Venu  
asked
2 answers
4

With the REST module from the appstore (https://appstore.home.mendix.com/link/app/997/Mendix/Rest-Services) comes a java action to copy data from a non-persistent entity to another entity. This works when the names for the attributes are equal. If this is not the case then just add a create option in a microflow that takes the non-persistent record as the input and map the values in the create action to your new persistent entity.

As for the date field, with the copy action just add a change action to set the date to the current date time. With the create option the same can be done in the create activity.

answered
-2

Hi Venu,

In addition to the (correct) answers already given, I'd recommend going through the Mendix Learnings: they are informative, easy to understand, and will probably help you get started by answering most of your initial questions, like the two you posted :)

Good luck!

answered