Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

passing parameter between two classes

(0) ShareShare
ReportReport
Posted on by

Hi Team,

I have two classes like class1 and Class 2

Class 1 - Extesion class of PurchLine

Class 2  - Class2 

So, from Class1 , I lke to send parameter of active record to Class 2.

I mean the PurchLine Recid to Class 2. ( Current record only)

Kindly let me know How will pass parameter from Class1 to Class 2

Pls give me more shed on this.

thanks!

  • @rp@n Profile Picture
    @rp@n on at
    RE: passing parameter between two classes

    Thanks Mohit and Girish

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: passing parameter between two classes

    Hi, I think you are trying to pass record from PurchLine table to a class. Is the class getting initialized in purchTable or is it used under a single scope like while inserting or updating record, you will pass the record to class and perform another operation in class?

    If it's not within single transaction/scope then park method will not work. If within single transaction then create and call parm method in class from table extension class.

  • Verified answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: passing parameter between two classes

    Hi,

    You can create one parm method on class 2.

    In class 1 which is extension class using instance of class 2 you can call the second class parm method by assigning purch table record to parm method.

    One more option will be calling the methods and on class 2 with arguments.

    Thanks,

    Girish S.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans