Create object from custom widget?

I am trying to create an object and then pass that object to a microflow from a custom widget. Currently, I am able to call the microflow I want and pass in parameters from existing objects in my database, but I want to create an object (with attributes) to pass in instead. How do I go about this? I currently have this code, which does not produce an error, but also does not seem to create an object in the database. Any help or ideas?   _this.saveRecording = function () {{         entity: "EmergencyAlert.testObj",         callback : function (obj) {            alert(obj); //This produces a string of numbers that resembles an object id         },         error: function (e) {             alert(e.message) }    })
1 answers

With this you create an object, which is not yet committed, hence not in the database.

In the callback of the make sure you get the object guid from the available ‘obj’ parameter.

Call the with this guid as inputparameter to trigger the microflow with this newly created object as input.