Hello,
I am using CRS980MI to add textblock . Based on requirement I have loop this API. Has anybody use the async function to make sure that API will come back with result and then only it proceed further. I have added return await promise but it doesn't work.
Thanks in advance.
var request = new MIRequest();
request.program = "CRS980MI";
request.transaction = "AddTxtBlockLine";
request.record = {
CONO: company
DIVI: "",
TXID: txid,
TXVR: "",
LNCD: "GB",
TX40: "",
LINO: xlino,
TX60: tx60,
TFIL: "MSYTXH00",
FILE: "MPLINE00"
};
request.includeMetadata = true;
request.typedOutput = false;
// request.outputFields = ["LINO"];
console.log(request);
var promise = MIService.Current.executeRequest(request);
return await promise;