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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Posting date validation based on the fiscal calendar

(0) ShareShare
ReportReport
Posted on by

Hello all!

I have a requirement where I want to give users permissions to only post transactions on a specified date range.

For this, I tried to customize  LedgerFiscalCalendarPeriodPostingValidator class. It essentially validates the Fiscal period and checks if posting is allowed or not.

I want to extend this class and add my logic of the date filter based on current user. But somehow my code is not working. I tried by both COC and Event handlers.

Can you please help me where I am wrong or if I should approach it differently.

Thank you.

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    Hi Sohan,

    The methods in the class of LedgerFiscalCalendarPeriodPostingValidator are private, so you can't use coc or eventhandler.For Private methods can be used only from the class where they're defined.So you can find a different way to implement your requirement.

    regards

  • Community Member Profile Picture
    on at

    Thanks Judy for the response. 

    LedgerFiscalCalendarPeriodPostingValidator have a public method named ‘validate’  in which all the private methods are called. So I can coc this method to write my logic. 

    But again my code is not being executed and neither the breakpoint is being hit if I run the debugger here. 

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Sohan,

    What is the underlying reason for this requirement?

    I never came across something alike.

    Would be great if you could elaborate.

    Many thanks,

    Ludwig

  • Community Member Profile Picture
    on at

    Hello Ludwig!

    We actually want to allow postings on only current date. The first answer to this problem I got was to create day wise periods in my Fiscal calendar. 
    But with that, we need to close/hold the period everyday. 
    So my idea was that instead of day wise periods, I can customize two Date fields on User (From and To date). 
    And based on these dates I will allow/prevent the user from posting and transactions.

    What do you suggest?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 665

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 569 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 301

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans