Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you post a purchase order in Microsoft Dynamics AX 2009: "Cannot create a record in Purchase order header - Updating table (PurchParmSubTable)"


View products that this article applies to.

This article applies to Microsoft Dynamics AX for all regions.

↑ Back to the top


Symptoms

When you post a purchase order in Microsoft Dynamics AX 2009, you receive the following error message:
Cannot create a record in Purchase order header - Updating table (PurchParmSubTable).


This problem occurs if one of the following conditions is true:
  • You enable the "Life sciences electronic signature audit trail setup" setting for all tables.
  • You create a record for the Common table.
  • You set the PurchParmTable table in the database log.
This problem occurs when you post a purchase order, a receipts list, a packing slip, and an invoice.


This problem occurs in the following products:
  • Microsoft Dynamics AX 2009 with Service Pack 1
  • Microsoft Dynamics AX 2009

↑ Back to the top


Resolution

Hotfix Information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics AX 2009 service pack or the next version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

↑ Back to the top


Installation information

Before you install this hotfix, verify that the Microsoft Dynamics AX client users are logged off the system. You should be the only client user who is logged on when you implement this hotfix.


To implement this hotfix, you must have a developer license.


Note We recommend that the user account in the Windows Logins window or in the Database Logins window be a member of the Administrators User group in Microsoft Dynamics AX.

Code changes

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Always test code fixes in a controlled environment before you apply the fixes to your production computers.

To resolve this problem, follow these these steps:
  1. Overwrite the code in the insert method in the PurchParmSubTable table as follows:
    public void insert()
    {
    PurchParmSubTable tempPurchParmSubTable;
    ;

    select tempPurchParmSubTable where
    tempPurchParmSubTable.ParmId == this.ParmId
    && tempPurchParmSubTable.TableRefId == this.TableRefId
    && tempPurchParmSubTable.OrigPurchId == this.OrigPurchId;
    if(tempPurchParmSubTable.RecId == 0)
    {
    super();
    }
    }
  2. Overwrite the code in the createFromPurchParmTable method in the PurchParmSubTable table as follows:
    static PurchParmSubTable createFromPurchParmTable(PurchParmTable _purchParmTable, boolean _insert = true)
    {
    PurchParmSubTable purchParmSubTable;
    systemSequence systemSequence;
    ;

    ttsbegin;

    purchParmSubTable.clear();
    purchParmSubTable.initValue();
    purchParmSubTable.initFromPurchParmTable(_purchParmTable);

    if (_insert)
    {
    systemSequence = new systemSequence();
    purchParmSubTable.RecId = systemSequence.reserveValues(1, tablenum(PurchParmSubTable));
    purchParmSubTable.insert();
    }

    ttscommit;
    return purchParmSubTable;
    }
  3. Overwrite the code in the insert method in the SalesParmSubTable table as follows:
    public void insert()
    {
    SalesParmSubTable tempSalesParmSubTable;
    ;

    select tempSalesParmSubTable where
    tempSalesParmSubTable.ParmId == this.ParmId
    && tempSalesParmSubTable.TableRefId == this.TableRefId
    && tempSalesParmSubTable.OrigSalesId == this.OrigSalesId
    && tempSalesParmSubTable.subId == this.subId;
    if(tempSalesParmSubTable.RecId == 0)
    {
    super();
    }
    }
Note You must merge any existing customizations in these methods.

Prerequisites


No prerequisites are required.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbmbscodefix, kbmbspartner, kbmbsmigrate, kbsurveynew, kbmbsquickpub, kbqfe, kb, kbnotautohotfix, kberrmsg

↑ Back to the top

Article Info
Article ID : 961909
Revision : 2
Created on : 9/19/2018
Published on : 9/19/2018
Exists online : False
Views : 382