I'm using priority's websdk to run a procedure, documentation can be found here - https://prioritysoftware.github.io/api/global/#priorityReady
Sample: https://prioritysoftware.github.io/api/proc_examples/#Running_a_Report
Here's my code -
try {
await priority.login(configuration);
let procStepResult = await priority.procStart('XXX_XXXXXXXXX_XX', 'P');
let data = {EditFields: [
{field: 1, op: 0, value: 'XX22222222'}
]};
procStepResult = await procStepResult.proc.inputFields(1 , data);
let a = await procStepResult.proc.continueProc(); // Finish the proc execution context
console.log(a.Urls[0].url);
} catch(err) {
console.log('Something bad happened:');
console.dir(err);
}
})();
This is working and produces html file but I wish to have a PDF file instead.
For that, I assume I should be using the documentOptions but for some reason that seems to return an error ...
TypeError: Cannot read properties of undefined (reading 'pdf')
at Proc.DocumentOptions (priorityapp-0.js:9761:17)
at priorityapp-0.js:10417:18
at new Promise (<anonymous>)
at Object.GetProc_0.proc.documentOptions (priorityapp-0.js:10416:14)
at C:\Users\elad\PhpstormProjects\asocs-web-sdk\index.js:19:52
I've tried using this code -
procStepResult = await procStepResult.proc.documentOptions(1, options);
Can you please advise how to make this work?