Is there any way to automatically generate a document using standard conversion?
I need to auto-exectute and save a document.
I tried using the function below:
function create_doc(findoc) {
try {
myObj = X.CREATEOBJFORM('CONVERTDLG');
myObj.SETPARAM('SOSOURCE', 1351);
var vSelRecs = 'FINDOC IN (' + findoc + ')';
myObj.SETPARAM('SELRECS', vSelRecs);
myObj.SETPARAM('PHOTO', 'TEST');
var cnvFprms = myObj.FINDTABLE('CONVERTFPRMS');
cnvFprms.SERIES = 30056; //
myObj.DBPOST();
} catch (e) {
if (myObj != null)
X.WARNING("Eroare generală: " + e.message + "\nEroare obiect: " + myObj.GETLASTERROR);
else
X.WARNING("Eroare generală: " + e.message);
}
}
I receive an sql error and it seems the problem is here
var vSelRecs = 'FINDOC IN (' + findoc + ')';
myObj.SETPARAM('SELRECS', vSelRecs);
selrecs is not recognized.
Thank you