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

Conditional validation in F&O report data contract class

(0) ShareShare
ReportReport
Posted on by 30

I have the following problem: my SSRS report has two date parameters - Date from and Date to. The client requests that the report be prepared through batch processing if this period is longer than 31 days. This report is an extension of the "Main account statement" standard report, so my contract class extends LedgerTransStatementContract, and my validate method of that class overrides the validate method of the parent class. My question is - how can I check in this validate method whether, on the SysOperation form that is displayed for specifying the report parameters, the "Batch processing" toggle is switched on or off (see picture). If it's set to Yes (toggle is switched on), there is no need for the check of the date period length. And vice versa, if it is set to No, a warning message needs to be displayed, saying that for this period, the report has to be prepared through batch processing.

pastedimage1684510998372v1.png

  • Suggested answer
    Martin Dráb Profile Picture
    240,854 Most Valuable Professional on at

    The contract doesn't have this information - use validate() method of the controller. I assume it'll be sufficient to check parmExecutionMode().

    By the way, you could the execution mode automatically instead of failing the validation.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
  • Ascalab Profile Picture
    30 on at

    Thanks, Martin, it seems to work.

  • Martin Dráb Profile Picture
    240,854 Most Valuable Professional on at

    Checking whether it runs in batch isn't useful here, because validation runs before the actual process is (or isn't) executed.

  • Martin Dráb Profile Picture
    240,854 Most Valuable Professional on at

    Ascalab , when you get an answer, please verify it (by using Did this answer your question? > Yes on the helpful reply (or replies)).
    This will make clear that more answers aren't needed and which reply contains the solution.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 528 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 424 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 374

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans