这是我的代码:
static void main(Args args)
{
LedgerJournalId ledgerJournalId;
HSinvoiceAcknowledgement hSinvoiceAcknowledgement = new HSinvoiceAcknowledgement();
if (classidget(args.caller()) == classnum(syssetupformrun))
{
if (formhasmethod(args.caller(), identifierstr(HSjournalnum)))
{
ledgerjournalid = args.caller().HSjournalnum();
}
}
if(ledgerJournalId)
{
hSinvoiceAcknowledgement.parmJournalNum(ledgerJournalId);
}
if (hSinvoiceAcknowledgement.prompt())
{
hSinvoiceAcknowledgement.run();
}
}
我的main方法中有 Args args 参数,但是它表示
Args对象未初始化
可能出错?
答案 0 :(得分:1)
只需添加一项额外检查即可确保{
"mob_type": "$input.params('type')"
"filename": "$input.params('filename')"
"assertion": "$input.params('assertion')"
}
不为空。替换
args
与
if (classidget(args.caller()) == classnum(syssetupformrun))