フォームのメソッドを呼び出します

オブジェクトの発信者= _args.caller(); // element.args()呼び出し元()ブールisCallForm。; // AX2009 isCallForm = SysDictClass :: isEqualOrSuperclass(classidget(発信者)、classnum(FormRun))。IF(isCallForm && formHasMethod(発信者、identifierStr(someMethodOnTheForm))){caller.someMethodOnTheForm()。}
静的な無効メイン(Argsの引数)
{
THK_InterfaceDataExtract THK_InterfaceDataExtract;
FormRun formRun = args.caller()。
オブジェクトcallerForm = args.caller()。
;
THK_InterfaceDataExtract = THK_InterfaceDataExtract ::構築();
もし(THK_InterfaceDataExtract.prompt())
THK_InterfaceDataExtract.run();
もし(formHasMethod(formRun、identifierstr(refreshdataを)))
callerForm.refreshData();
} // AX2012場合(発信者がFormRun && formHasMethodある(発信者、identifierStr(someMethodOnTheForm))){caller.someMethodOnTheForm()。
}
例:
静的な無効WL_YZF_ClassTransferItemMenuItem(Argsの_args)
{
SalesTable salesTable;
引数引数;
FormRun myFormRun;
MenuFunction MF;
SalesFormLetter_Invoice SalesFormLetter_Invoice;
;
firstonlyがsalesTableを選択
salesTable.SalesId == "00002173_C05"。
引数=新しいのArgs(ClassStr(SalesFormLetter));
args.record(salesTable)。
MF =新しいmenuFunction(identifierstr(SalesFormLetter_Invoice)、MenuItemType ::アクション)。
mf.run(引数)。
}

おすすめ

転載: www.cnblogs.com/xtwkh1973/p/10992868.html
おすすめ