Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Adding a line to Accounting Distribution form

Posted on by 10

We recently implemented a new way of posting timesheets where a person enters a category into their timesheet, but based on the day of the week, holiday, or whether it's overtime, the timesheet is posted and assigned to a different category. The logic for that is all in place and working properly (Used the SubledgerJournalizerProjectExtension class to accomplish this). 

On top of this, I need to make the accounting distributions form work properly so people know where the timesheet categories are being posted to when the actually get posted. This is where I am having trouble, I can't seem to figure out how the AccountingDistribution table is populated (It looks like the projectAccountingDistribution table is populated based on the Accounting Distribution). 

I was trying to work around this by using the editProjectCategoryId method in the projectAccountingDistribution table and various methods within the form for the amount and percent fields of the form. I was able to make this work in all scenarios aside from the one where I need to create an extra line.

The issue comes into play when a person works overtime for a given day. In this case I need to add an additional line to the form so the first line will take 1 category(and the first 8 hours from timesheet) and the second line will take the hours after 8. I'm having trouble figuring out the best way to do this, and if it's possible to sort of just overwrite the data within the existing form or if I need to fix it where the data is initially populating the accountingDistribution table. We are only using the form to view how the timesheet is posted before it's actually posted, which is why I was hoping to just be able to overwrite the data. Below is and example:

The highlighted day on the left - the worker worked 10 hours. So I need one line where he the category is weekday, percent is 80, amount is 400. And another line where the category is overtime, amount is 100, percent is 20. Basically I just need to know how to get the extra line and I believe I'd then be able to use the methods mentioned above to get the correct info in the fields.

acctdistrib.PNG

Any help would be appreciated.

*This post is locked for comments

  • Jhonatan Ramirez Profile Picture
    Jhonatan Ramirez 40 on at
    RE: Adding a line to Accounting Distribution form

    Hello,

    Did you find a solution? I have a similar requirement, need to add additional category.

    all the best!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans