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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Form Methods and controls

(0) ShareShare
ReportReport
Posted on by 70

pastedimage1684236202119v1.png

i have a button called calculateemi , if i select a record and click on calculate emi it should calculate emi and insert them in another table. if records already exist for the loan either it should show msg as exist or button should be disabled. How can i achieve it ?

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi,

    You need to add the validation on the active method of the form DataSource. Add the select statement to check whether the record exist for the loan. If record exists, make the button as enabled equal to false otherwise true.

    Thanks,

    Girish S.

  • gaya3 killy Profile Picture
    70 on at

    Hi,

    I already wrote code for disabling the button. But i need emi records to be inserted which are equal to tenure when i click on calculate emi. only selected record emi's should be inserted . how can i pass active record details to clicked method of button control and i need to loop through it.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, In clicked method of calculateEMI button, write code to calculate and insert record im another table.

    Change AutoDeclaration property of calculateEMI button to yes. In active method of form datasource, write select statement to find related record in another table and enable calculateEMI button if found else disabled

    Check this article

    https://wp.me/p9INDW-w

  • GirishS Profile Picture
    27,827 Moderator on at

    You can use DataSourceName.FieldName to get the current selected record.

    If the multiple records are selected, you need to make use of multiselecthelper class.

    You need to add the code on clicked method.

    https://community.dynamics.com/ax/b/mafsarkhan/posts/get-select-records-by-multiselectionhelper-class

    Thanks,

    Girish S.

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    You can access FormDatasource directly in clicked method by its name.I believe it's a custom form.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans