Mass create entries on an object, based on another 2 objects
Hey, everyone.
I've been on this for a while now, but I can't figure it out.
I've got this workflow from my print, and it has the following function:
- Get the information from a newly created entry on the object "Class"
- Reading the information from "Class level" (it has the quantity of classes said level needs and what's the starting "Class number" that it must have),
- Create "classroom" entries based on the "starting date" (it's a property from "Class") and "days of the week with time" (I've made it so that my object "Class" had a boolean for each day and a "time" for each day too ).
Does anyone knows how to construct a "Scripted task" (I belive that it is the ONLY way I can make it work) to do that?
Business process:
Class table information, regarding how I've constructed the Day of the week + hour;
Like
Hello,
There is no need to use a script task here. A simple sub-process call with mass creation of records using the "Add data" element will also work as expected.
If you want to use the code:
See example 6
EntitySchema contactSchema = UserConnection.EntitySchemaManager.GetInstanceByName("Contact");
Entity contactEntity = contactSchema.CreateEntity(UserConnection);
contactEntity.SetDefColumnValues();
contactEntity.SetColumnValue("Name", "User01");
contactEntity.Save();
The things to change here are the entity name and the column values (and column names).
Hey, Kalymbet!
Many thanks for the response.
I'll try it and come back here later today to coment!