Create object from custom widget?

0
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 () {     mx.data.create({         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) }    })
asked
1 answers
1

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

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

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

answered