in

Dynamics User Group

Since 1995 - The Microsoft Dynamics Online User Community

Enable Disable Button when Form have no lines/record

Last post 07-29-2008 11:16 by rinoa04. 2 replies.
Page 1 of 1 (3 items)
Write a New Post Sort Posts: Previous Next
  • 07-29-2008 10:14

    • rinoa04
    • Top 500 Contributor
    • Joined on 01-11-2008
    • Posts 31
    • Points 480

    Enable Disable Button when Form have no lines/record

    Hello,

    Anyone have any idea on how to disable a button on form when there is no line on the form. If there is line/record on the form then the button will be enabled. Is it possible to do so? Normally, button can be enabled and disabled by checking on the status of the record if the button enabling depends on different records. But how to cater for the above problem where button will enable or disable depends on whether there are line on the form or not.

    Thank you 

     

     

    • Post Points: 20
  • 07-29-2008 10:33 In reply to

    • cytech
    • Not Ranked
      Male
    • Joined on 07-29-2008
    • Jakarta, Indonesia
    • Posts 7
    • Points 120

    Re: Enable Disable Button when Form have no lines/record

     you can check loaded record on datasource like this,

    if(yourdatasource_ds.numberOfRowsLoaded() == 0)

    {

              //disable your button here

    }

    • Post Points: 20
  • 07-29-2008 11:16 In reply to

    • rinoa04
    • Top 500 Contributor
    • Joined on 01-11-2008
    • Posts 31
    • Points 480

    Re: Enable Disable Button when Form have no lines/record

    Thank you cytech.

    I manage to do it with another method. However, I have try you method also and it works. By the way, I have a doubt to clarify. Is this a new method apply in Dynamics Ax 2009? I can get this method in Ax 2009 but not in Ax 4.0.

    • Post Points: 5
Page 1 of 1 (3 items)


Copyright Dynamics User Group, 1995-2008, all rights reserved. This website and user group are independent and not affiliated with the Microsoft Corporation.