Skip to main content

Notifications

Announcements

No record found.

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

  • Martin Dráb Profile Picture
    Martin Dráb 230,468 Most Valuable Professional on at
    RE: Conditional validation in F&O report data contract class

    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.

  • Martin Dráb Profile Picture
    Martin Dráb 230,468 Most Valuable Professional on at
    RE: Conditional validation in F&O report data contract class

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

  • Ascalab Profile Picture
    Ascalab 30 on at
    RE: Conditional validation in F&O report data contract class

    Thanks, Martin, it seems to work.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: Conditional validation in F&O report data contract class

    community.dynamics.com/.../quickfix-6-how-to-check-if-code-is-running-on-batch-server

    Please check this link.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: Conditional validation in F&O report data contract class

    community.dynamics.com/.../quickfix-6-how-to-check-if-code-is-running-on-batch-server

    Please check this link.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,468 Most Valuable Professional on at
    RE: Conditional validation in F&O report data contract class

    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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans