我已完成从ax 2012 rtm到ax 2012 r2的原位升级
但目前我在尝试确认采购订单时遇到以下异常
执行代码时出错:变量赋值中的参数类型错误。
堆栈跟踪
(S)\Classes\FormLetterContract\unpack - line 8
(S)\Classes\PurchFormLetterContract\unpack - line 13
(S)\Classes\SysOperationDataContractInfo\unpackDataContractObject - line 21
(S)\Classes\SysOperationController\unpackDataContractInfoObjects - line 34
(S)\Classes\SysOperationController\unpack - line 70
(S)\Classes\SysOperationServiceController\unpack - line 15
(S)\Classes\PurchFormLetter\unpack - line 10
(S)\Classes\PurchFormLetter_PurchOrder\unpack - line 73
(S)\Classes\xSysLastValue\getLast - line 29
(S)\Classes\SysOperationController\loadFromSysLastValue - line 29
(S)\Classes\SysOperationController\getDataContractInfoObjects - line 10
(S)\Classes\SysOperationController\getDataContractInfoObject - line 17
(S)\Classes\SysOperationController\getDataContractObject - line 18
(S)\Classes\FormLetterServiceController\init - line 3
(S)\Classes\PurchFormLetter_PurchOrder\init - line 3
(S)\Classes\PurchFormLetter_PurchOrder\newPurchOrder - line 7
(S)\Classes\PurchFormLetter\construct - line 11
(S)\Classes\PurchFormLetter\mainOnServer - line 46
(C)\Classes\PurchFormLetter\main - line 50
(C)\Classes\FormFunctionButtonControl\Clicked
我尝试调试它并达到了这一点,[version,#ParmListFormLetter] = _packedClass发生异常;在FormLetterContract
中我试图清除xppil,做一个完整的编译和CIL生成和同步字典,但错误仍然出现我还检查了堆栈跟踪中的类的自定义,但所有这些都是sys层,没有任何自定义
public boolean unpack(container _packedClass)
{
Integer version = conPeek(_packedClass,1);
switch (version)
{
case #CurrentVersion:
[version, #ParmListFormLetter] = _packedClass;
break;
default :
return false;
}
return true;
}
可以就此提出任何建议 非常感谢您的帮助
答案 0 :(得分:0)
只要查看您提供的代码,并且不了解这些类从2012 RTM的更改,我就会执行以下操作:
确保#ParmListFormLetter宏(在FormLetterContract类声明中找到)中指定的parm列表与通过_packedClass传入的parm列表匹配。如果它们不同,则需要更改CurrentVersion宏中指定的版本号。然后为代码中默认情况下的差异编写自定义处理程序。
尝试向前编译FormLetterContract。右键单击AOT中的类节点,然后转到Add-Ins>向前编译。这将解决任何与继承相关的类型问题。我唯一一次遇到你所描述的错误,编译转发就是解决它所需要的全部工作。