Maybe you have to save and commit the object before passing it.
I am trying to do the same, The micro flow is triggered, but the parameter object keeps being empty, I tried to save and commit as suggested but didn’t worked. can anyone help?
Method 1:
function passStringToMicroflow(stringValue) {
mx.data.create({
entity: "Signature.ImageNP",
callback: function (obj) {
obj.set('ImageNPname', stringValue);
object.set('ImageNPname', stringValue);
object.save();
mx.data.action({
params: {
applyto: "selection",
actionname: "Signature.signMF",
guids: [obj.getGuid()],
},
});
obj.save();
mx.data.commit(obj);
}
});
}
Method 2:
function passStringToMicroflow(stringValue) {
mx.data.create({
entity: "Signature.ImageNP",
callback: function (object) {
alert(object + ':' + stringValue);
object.set('ImageNPname', stringValue);
object.save();
mx.data.commit(object);
mx.processor.xasAction({
error: function () {
logger.error(this.id + "error: error while executing search");
},
actionname: "Signature.signMF",
guids: [object.getGUID()]
});
}
});
}