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.

After applying RU6, the NF-e Federal form will be empty


View products that this article applies to.

Symptoms

After applying Rollup 6 (KB2405516), the NF-e Federal form will be empty. You won't be able to verify the status related to the NF-e Federal invoices previously posted and it is not possible to know what action should be taken.

↑ Back to the top


Cause

There is a coding defect in the RelaseUpdateDB60_Cust class, updateReferencesInEFDocument_BR method. 

This method updates the table EFDocument_BR so that it always references the FiscalDocJour_BR table. In previous versions, EFDocument_BR used to keep references to the invoice that originated the Brazilian fiscal document, such as CustInvoiceJour and VendInvoiceJour. From now on, the pair of fields RefTableId and RefRecId  will always reference the Brazilian fiscal documents table: FiscalDocJour_BR.

When this method is executed in a Rollup 5 environment from which new NF-e’s were created, these NF-e’s (which were already ok) will now lose their relationships with FiscalDocJour_BR, causing the blank form. This method should only be executed for NF-e’s referencing to CustInvoiceJour and VendInvoiceJour. 

↑ Back to the top


Resolution

We strongly recommend to perform a full backup of the AX database before executing the steps described in this KB article.

1. When to apply the fix
After applying the RU6 package, launch the AX client and the “Upgrade checklist” wil appear. Before running the “Presynchronize”, you must apply this fix.

2. Open the AOT and insert the following “WHERE” statement in the RelaseUpdateDB60_Cust class, updateReferencesInEFDocument_BR method.

Before:
    while select forupdate eFDocument
    {
        fiscalDocJour = FiscalDocJour_BR::findRefRecId(eFDocument.RefTableId, eFDocument.RefRecId);
        eFDocument.RefTableId   = fiscalDocJour.TableId;
        eFDocument.RefRecId     = fiscalDocJour.RecId;

        eFDocument.doUpdate();
    }

After:
    while select forupdate eFDocument
        where eFDocument.RefTableId != tablenum(FiscalDocJour_BR)
    {
        fiscalDocJour = FiscalDocJour_BR::findRefRecId(eFDocument.RefTableId, eFDocument.RefRecId);
        eFDocument.RefTableId   = fiscalDocJour.TableId;
        eFDocument.RefRecId     = fiscalDocJour.RecId;

        eFDocument.doUpdate();
    }

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2478550
Revision : 2
Created on : 9/26/2018
Published on : 9/26/2018
Exists online : False
Views : 190