title: Ax 2012 Error executing code: Wrong argument types in variable assignment when confirming PO
body: <p>i have completed an in place upgrade from ax 2012 rtm to ax 2012 r2 </p>
  
  <p>but currently i am having the below exception when trying to Confirm a purchase order </p>
  
  <p>Error executing code: Wrong argument types in variable assignment.</p>
  
  <p>Stack trace</p>
  
  <pre><code>(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
  </code></pre>
  
  <p>i tried to debug it and reached to this point  where exception occurs on     [version, #ParmListFormLetter] = _packedClass; in the FormLetterContract</p>
  
  <p>i tried to clear xppil, do a full compile and CIL generation and sync dictionary but the error still appear i also checked for customization in the classes in the stack trace but all of them are sys layer and free of any customization  </p>
  
  <pre><code>public boolean  unpack(container  _packedClass)
  {
      Integer  version = conPeek(_packedClass,1);
  
      switch (version)
      {
          case #CurrentVersion:
              [version, #ParmListFormLetter] = _packedClass;
              break;
          default :
              return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>could any one advice about this 
  your help is most appreciated</p>