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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 1,075
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)
  • Sohaib Cheema Profile Picture
    49,103 User Group Leader on at
    use PrePromptModifyContract and PreRunModifyContract methods in controller class in D365F&O
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 724 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 580 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 554

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans