I need to create some reports using the websdk pertaining to orders and price quotes.
(我需要使用websdk创建一些与订单和报价有关的报告。)
I tried following the documentation but even the example given in the developer portal is lacking a lot of crucial information. (我尝试遵循文档,但是即使开发人员门户网站中给出的示例也缺少很多关键信息。)
Specifically, I need to work with these two procedures:
(具体来说,我需要使用以下两个过程:)
- ESH_WWWSHOWORDER3
(ESH_WWWSHOWORDER3)
- ESH_WWWSHOWCPROF2
(ESH_WWWSHOWCPROF2)
I tried writing some logic arround the sample found on https://prioritysoftware.github.io/api/procedure/#Introduction
(我尝试写一些关于https://prioritysoftware.github.io/api/procedure/#Introduction上的示例的逻辑)
const procedure = priority.procStart(PROC_NAME,"R", () => {},customerName, function(procSuccess){
logger.info('Proc start OK, received documentOptions');
logger.info(JSON.stringify(procSuccess));
logger.info('Specifying format...');
resolve(new Promise((resolve, reject) => {
procSuccess.proc.documentOptions(1,1,2,procSuccess => {
logger.info('Received inputFields');
logger.info(JSON.stringify(procSuccess));
procSuccess.proc.inputFields(1,{ORDNUM: ordernum}, procSuccess => {
logger.info('Received url');
logger.info(JSON.stringify(procSuccess));
});
}, procError => {
reject(procError)
})
}));
}, function(procError){
logger.error('Proc start error');
logger.error(procError);
reject(procError);
});
}).catch(err => {
logger.error(err);
})
Where PROC_NAME is WWWSHOWORDER
(其中PROC_NAME是WWWSHOWORDER)
I am trying to understand what the process is asking of me, but it's not really clear.
(我正在尝试了解流程对我的要求,但是还不清楚。)
I tried supplying some values in the order specified by the documentation but I get errors that are not very descriptive to someone who doesn't know the ins and outs of Priority. (我尝试按文档指定的顺序提供一些值,但是我得到的错误对于那些不了解优先事项的人不是很能描述。)
The logs look somehting like this
(日志看起来像这样)
Starting Procedure WWWSHOWORDER
2019-11-26T11:55:31.718Z info: Proc start OK, received documentOptions
2019-11-26T11:55:31.719Z info: {"proc":{"name":"WWWSHOWORDER"},"type":"message","message":"No such Tabula entity"}
2019-11-26T11:55:31.721Z info: Specifying format...
2019-11-26T11:55:32.124Z info: Received inputFields
2019-11-26T11:55:32.125Z info: {"proc":{"name":"WWWSHOWORDER"},"type":"message","message":"Failure to p...
Unfortunately my logs are truncated for some strange reason...
(不幸的是,由于某些奇怪的原因,我的日志被截断了。)
ask by aradu translate from so