Skip to main content

Notifications

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

Enable button on a Form

(0) ShareShare
ReportReport
Posted on by 7,177 Super User 2025 Season 1
Hi All,
 
I want to enable a button on the form when all data is loaded to make sure all records are included. How can I achieve that?
I am working on Standard form and the button is created through extension on Form.
 
Regards,
Waed
  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    Enable button on a Form
    I haven't tried it but check if this article helps.
     
    https://axatoz.wordpress.com/2013/11/24/get-number-of-records-in-a-formdatasource/
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Enable button on a Form
    Thats the question i am asking how you are confirming that all records are loaded?
    By default all the records will be loaded in the form unless there is any range filters.
     
    Thanks,
    Girish S.
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,177 Super User 2025 Season 1 on at
    Enable button on a Form
     
    Currently I can click button and the code will only apply to the loaded records.
     
    Regards,
    Waed
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,177 Super User 2025 Season 1 on at
    Enable button on a Form
    Hi Girish S.,
     
    What about  FormDatasource.allRowsLoaded() it check if the whole records are loaded or not. Can I use it by enable button on activated event handler of form.
     
    Regards Waed
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Enable button on a Form
    Hi waed,
     
    System doenst know the whole record is loaded.
    You need to find out whether full record is loaded based on some condition and enable or disable the button on the active method of the datasource.
     
    Thanks,
    Girish S.
  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    Enable button on a Form
    Hi Waed, Are you able to click button while data is loading on form? I think system will go in non responsive mode if we do that. If not able to click while data loading then you can enable it anywhere as per requirement, like on active method of datasource if you want to enable or disable button based on certain values in a record.

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…

Vahid Ghafarpour – Community Spotlight

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

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans