web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

The field with id 0 does not exist in table 'CustInviceJour'

(0) ShareShare
ReportReport
Posted on by 172

Hi,

I've got an error trying to print a duplicate for free invoice.

I found that it might be a problem with mappings but I don't know where are they or how to fix it.

Any help here?

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    This means that a field being referenced does not exist in CustInvoiceJour.

    Had you created any table extensions to CustInvoiceJour? Maybe you have created a field and deleted it which is still being referenced in the DP class.

  • RadekM Profile Picture
    172 on at

    No ther'e ano no extensions outside the  3 standard App Suite ones.

    The problems occour both on my dev and productions what isn't good.

    It appears only on free text invoice dduplicated normal sales duplicated go without any error.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    When you say duplicated, are you trying to print a copy of Free text invoice?

    Also, do you have any specific country region Ids set for the legal entity?

  • RadekM Profile Picture
    172 on at

    I create a duplicate of invoice. It stores in CustInvoiceDuplicate_W

    And when I create on I want to print it there but then the error poops out.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    I think you will need to debug the FreeTextInvoiceDP class and see which assignment is throwing this error.

    My assumption is that it is trying to set a field that is set for another Legal entity and hence isn't enabled as per your system config.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Radek,

    If you haven't done any changes to the report itself, I recommend creating a support request to MS so they can analyze the issue and provide a workaround or fix in the future version.

  • RadekM Profile Picture
    172 on at

    I did create a custom report for it but after removing the project and model reference the error was still the same.

    Btw. doing only my model rebuild with references is enough here?

    I tried to debug it but the error occoured in FreeTextInvoiceController in initFormLetterReport at

    if (!journalList || !journalList.first(custInvoiceJour)

    and in MenuFunction atry

     if (this.hasRunPermissions(_args))
                    {
                        // Don't call Kernel's run method for class if running as IL
                        new ExecutePermission().assert();
                        //push the context of this entry point to the thread before executing the class
                        context = SecurityContext::constructFromEntryPoint(this.convertToSecurableType(this.type()),this.name(),'');
                        context.push();
                        try
                        {
                            dc.callStatic(#Main, _args);
                        }
                        finally
                        {
                            SecurityContext::pop();
                        }
                    }

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Are you using any of the custom DP classes, If so you might want to build that model along with your custom model. Also, please do a DB synch.

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    Have you tried the entire DB sync? In the custom report design, reselect the dataset from UI don't just do restore. I remember seeing such error and after the reselecting, the dataset issue was resolved. But In my case, I had added new columns in the temp table.  

    I got confused about what is the current state in your case. Do you have the custom (duplicate) SSRS? What another thing you can do it to debug. Add the breakpoint on the infolog-> add method. once you get the error you can check the call stack and check at which field you are getting this error.

  • RadekM Profile Picture
    172 on at

    Yes I did full DB sync. Now I tried to reselect the dataset but I might do it wrong idk. I added in my custom report new fields.

    By reselecting u mean to let ireselect a DP for it? After I made that I got some field 'duplicated' like they have Label or name within and the display name is varies from like  CustInvoiceRefNum and CustInvoiceRefNum 1.

    And now I cant build my solution. it calls Unidentifiable subsstring "value" in expression.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans