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, ...
Answered

use PrePromptModifyContract and PreRunModifyContract methods in controller class in D365F&O

(4) ShareShare
ReportReport
Posted on by 1,323
Dear all,
 
I go through SSRS report concept to use with RDP class. So, came to know that we can also use below methods on Controller class 
PrePromptModifyContract and PreRunModifyContract  when required. But I don't know when to use those methods.
 
**"Kindky give me an example to use both methods on Controller class.
 
I mean ,for which purpose I used both methods in Controller class in SSRS report.
 
Kindly advise pls.
 
Thanks in advance.
Categories:
I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at
    Hi,
     
    Also I am going to copy/paste the description from the standard class, that pretty much explains it.
     
    /// <summary>
    /// Provides the opportunity to modify the contract before the dialog is shown to the user.
    /// </summary>
    /// <remarks>
    /// This method is invoked for interactive scenarios.
    /// This method is not invoked for batch scenarios. This means any member variables
    /// instantiated in this method will not be available for the lifetime of the controller
    /// in batch scenarios
    /// </remarks>
    protected void prePromptModifyContract()
    {
    }
     
     
    /// <summary>
    /// Provides the opportunity to modify the contract before the report is run.
    /// </summary>
    /// <remarks>
    /// The following are common scenarios for which to use this method:
    /// <list type="bullet">
    /// <item>
    /// <description>Modifying the query.</description>
    /// </item>
    /// <item>
    /// <description>Setting the contract values that are hidden from the user on the dialog.</description>
    /// </item>
    /// <item>
    /// <description>Subscribing to the <c>renderingComplete</c> event.</description>
    /// </item>
    /// </list>
    /// </remarks>
    protected void preRunModifyContract()
    {
    }
     
     
     
    You can find these methods in the class named SrsReportRunController. By checking the references for the two methods, you can see many examples in the standard system

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans