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 :
Microsoft Dynamics AX (Archived)

Expense Report Accounting Distribution missing Project and Category

(0) ShareShare
ReportReport
Posted on by 3,155

Lately, we have had several expense reports get posted with Accounting Distributions that don't account for the Project and Category.  This causes a problem as it doesn't create a Project Transaction like it should.

ER:

ERDA.jpg

Accounting Distribution:

DA.jpg

As you can see, the Accounting Distribution fields for Project ID and Category are blank.

Even more interesting, the other 'Hotel' lines and other category lines are just fine. It's only this one.

Any ideas on what might cause this?

*This post is locked for comments

I have the same question (1)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi,

    Have you already tried deleting and recreating the line with the missing linkage?

    Do you know if something has been modified here? In your first screenprint I see Project/Worksite, which does not look like standard AX.

    Best regards,

    Ludwig

  • b_radlyjames Profile Picture
    3,155 on at

    The label on the field has been modified, however, it is otherwise standard.

    Yes, removing the line and recreating will bring in the correct accounting distribution.  Sometimes, however, we don't always catch this error until our reconciliation of the account it is hitting.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi,

    Can you specifically recreate the issue or does it only happen every now and then?

    Best regards,

    Ludwig

  • b_radlyjames Profile Picture
    3,155 on at

    Ludwig,

    It only happens every now and then.  I have been unable to recreate this same issue in a test environment.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    This makes things difficult because if we could recreate it we could report it to MS and open a support ticket.

    If you can't recreate it, try at least following up when the issue arises again.

    There might be a pattern / specific combination which is responsible for this...

  • b_radlyjames Profile Picture
    3,155 on at

    Ludwig,

    Thank for the help here.

    I will continue to try and recreate it.  I have input a check before posting of the ER.  If this situation occurs again, it will prevent posting and log all relevant data for review later.

    Thank you!

  • Akshay_P Profile Picture
    75 on at

    Hi BradlyJames,

    Did you find any solution for this ?.. i have a similar issue... In my case ActivityNumber is missing in Project accounting distribution because of that is coming blank in posted transactions even if it is available in timesheet lines.

    Thanks in advance

  • b_radlyjames Profile Picture
    3,155 on at

    Akshay,

    I haven't found a solution yet.  This has been very difficult to recreate to know what exactly is causing it.

    In the short term I created a validation in Tables\TrvExpTrans.validatePost:

    retval = retval && this.MYCODE_validateAccountingDistribution();

    In my case, the project accounting distribution record was missing entirely.  Whereas I wouldn't want to post without that, I check it this way:

    private boolean MYCODE_validateAccountingDistribution()
    {
        AccountingDistribution          accountingDistribution;
        ProjectAccountingDistribution   projectAccountingDistribution;
        TrvExpTrans                     trvExpTrans;
        boolean                         retValue = true;
    
        while select SourceDocumentLine, LineNumber from trvExpTrans
            where trvExpTrans.ExpNumber == this.ExpNumber
            && TrvExpTrans.CreatingWorker == this.CreatingWorker
        {
            select RecId from accountingDistribution
                where accountingDistribution.SourceDocumentLine == trvExpTrans.SourceDocumentLine
            join RecId from projectAccountingDistribution
                where projectAccountingDistribution.AccountingDistribution == accountingDistribution.RecId;
    
            if (projectAccountingDistribution.RecId == 0)
            {
                retValue = checkFailed(strFmt("Accounting distribution is invalid for ER '%1' line '%2'. Remove and recreate the line.", this.ExpNumber, trvExpTrans.LineNumber));
            }
        }
    
        return retValue;
    }

    This will return a 'FALSE' and stop posting if the project accounting distribution is missing.  Until we find the root cause, this will have to do.

  • Dave C Eng Profile Picture
    on at

    Hi,

    We are getting this same issue in 10.0.16 F&O 

    The project is on the expense report. You can even see it picks up the financial dimensions of the project

    pastedimage1620211647026v1.png

    Again this is happening sporadically and we can't reproduce. 

    Did you ever get to the bottom of this on 2012?

    Thanks

    Dave

  • b_radlyjames Profile Picture
    3,155 on at

    DaveC,

    I was never able to determine root cause so I put in a check to validate that there was a Project. Under both the TrvExpTable & TrvExpTrans tables, I added a check to the 'validatePost' method:

    retval = retval && this.VER_validateAccountingDistribution();
    
    //Here is the method
    private boolean VER_validateAccountingDistribution()
    {
        AccountingDistribution          accountingDistribution;
        ProjectAccountingDistribution   projectAccountingDistribution;
        TrvExpTrans                     trvExpTrans;
        boolean                         retValue = true;
    
        while select SourceDocumentLine, LineNumber from trvExpTrans
            where trvExpTrans.ExpNumber == this.ExpNumber
            && TrvExpTrans.CreatingWorker == this.CreatingWorker
        {
            select RecId from accountingDistribution
                where accountingDistribution.SourceDocumentLine == trvExpTrans.SourceDocumentLine
            join RecId from projectAccountingDistribution
                where projectAccountingDistribution.AccountingDistribution == accountingDistribution.RecId;
    
            if (projectAccountingDistribution.RecId == 0)
            {
                retValue = checkFailed(strFmt("Accounting distribution is invalid for ER '%1' line '%2'. Remove and recreate the line.", this.ExpNumber, trvExpTrans.LineNumber));
            }
        }
    
        return retValue;
    }

    By checking for a 'ProjectAccountingDistribution' I can determine if the Project is correctly specified.  Hopefully this helps.

    Brad

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans