Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Passing a date from a form to a form part where the datasets are not the same.

Posted on by

I have a form where the user enters a  date into a variable _reporthrudate .  This form has a form part that uses a different dataset but the dataset needs to calculate based on the _reportthru date that the user entered in the main form.   How do I pass the date entered by the user in the main form to the form part form so that my calculations as for the same periods.   The forms do not use the same dataset.

Thanks .

*This post is locked for comments

  • Verified answer
    cauditor Profile Picture
    cauditor on at
    RE: Passing a date from a form to a form part where the datasets are not the same.

    Thank you for the response.  We got it working.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: Passing a date from a form to a form part where the datasets are not the same.

    You have many ways. For example, if the value is in a datasource, you can pass to the other form and read it from there (what kind of datasource is used by the target for is irrelevant). If you have it in a variable only, you can save it to an object and pass it to the other form through Args.parmObject(). Or the target form can get a reference to the caller form (element.args().caller()) and call its method to get the value. And so on.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans