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

How to get class contract parameter value in another class ?

(0) ShareShare
ReportReport
Posted on by 229

Hi all,

I'm working on a report Cust Aging report and i customized it with a new parameter.

In DP class i m able to get this parameter value.

How could i get it also on another class used on my report ?

Regards.

  • Suggested answer
    GirishS Profile Picture
    27,845 Moderator on at

    Hi Awaxx,

    If you are calling another class inside the DP class - You can create one parm method in the another class and pass the value to that parm method - Inside that class, you can use that parm method.

    Thanks,

    Girish S.

  • Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi, Can you provide more information about the other class. Is that class initialized in CustAgingDP class.

  • Awaxx Profile Picture
    229 on at

    Thank you first

    Then Could you elaborate please ? Do you have an example to follow ?

  • Awaxx Profile Picture
    229 on at

    Hi Mohit Rampal

    I'm trying to use this parameter from CustAgingDp  on CustAgingCalculation extension

    Regards

  • GirishS Profile Picture
    27,845 Moderator on at

    It's similar to calling contract class inside the DP class to get the values.

    Create one parm method in another class - Assign the value to that parm method inside the DP class.

    Thanks,

    Girish S.

  • Awaxx Profile Picture
    229 on at

    Hi GirishS 

    Not very sure how to link CustAging DP class to my CustAgingCalculation Extension with parameters

    I tried something i found like this :

    public class MyClass
    {
        // Declare the parm method
        public void parmMyParameter(str _myParameter)
        {
            // Assign the parameter value to a class member variable or use it as needed
            this.myParameter = _myParameter;
        }
    
        // Class member variable to store the parameter value
        private str myParameter;
    }
    
    And use that like here :
    
    
    MyClass myObject = new MyClass();
    
    // Set the parameter value using the parm method
    myObject.parmMyParameter("Hello World");
    
    // Get the parameter value using the parm method
    str parameterValue = myObject.parmMyParameter();
    

    But need to pass many arguments in new method to reach directly my extension class but not accessible on DP class but i m not sure

    I will dig again

    Regards

  • Awaxx Profile Picture
    229 on at

    Hi guys i tried many things but still not reach my goal

    Could someone help ?

  • Arunraj Rajasekar Profile Picture
    1,743 on at

    Hi Awaxx,

    Can you elaborate on how you are trying to use CustAgingCalculation class with CustAging DP class, that will help us to give more suggestion on linking the two classes

  • Awaxx Profile Picture
    229 on at

    Hello arunraj

    I need to use a field input (dimension) given by class DP and the contract variable on custagingcalculation class and preprocess method to delete transaction which dont have the input value.

  • Arunraj Rajasekar Profile Picture
    1,743 on at

    is custagingcalculation an extension class you created for CustAging DP?

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 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans