I have opened the wizard from JS , now i need the wizard to return value to JS.
Code
async openWizard() {
return new Promise((resolve) => {
var value = this.actionService.doAction(
{
type: "ir.actions.act_window",
res_model: "employee_link",
view_mode: "form",
view_type: "form",
views: [[false, "form"]],
target: "new",
},
{
onClose: () => resolve(value),
}
);
console.log(value)
});
},
on cosole it is printing :
[[Prototype]]: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: undefined
Thanks, but how can I store the wizard record ID mentioned in the answer?
const recordId = this.wizardRecordId; // Assuming you store the wizard record ID somewhere