Hi everyone,

After further investigating I seem to have managed to find that in the class
'Info' in methods formNotify or activate (what is the difference and which
one is better for what I want I do not know, would appreciate some advice
thanks or any documentation help on the formrun class and its methods) I can
catch whenever a record is selected by the user.  Within Info an object of
type FORMRUN is in scope and I can do something like

formrun.control(1).enabled(False)

which I believe can allow me to disable a control on the form.  Now I just
need to know how can I know what ID a control is (either via checking the
AOT or via some code) and also is there a better way to write the code so it
wont break if the IDs of the control get changed (is it even possible for
the IDs of controls to change?)

Something like maybe:
formrun.control(controlID('tabHeaderSimple')).enabled(0)

Thanks for all the help I am not a programmer but need to check out whether
my 'dream' is realistically doable so sorry if my questions are a little
basic for developers
Thanks
James


-----Original Message-----
From: James Flavell [mailto:[EMAIL PROTECTED]
Sent: 15 February 2005 09:16
To: 'development-axapta@yahoogroups.com'
Subject: RE: [development-axapta] Dynamic form changes possible?


Thanks Malcom that helps to give me some other areas to investigate and
clear up the concern on performance but is there any higher level place to
catch the data source Active() trigger?

I am trying not to have to go to every form to add code but rather trying to
make a solution whereby a bit like the security setup the user can setup to
say on a particular form if x,y,z conditions are meet then control 'button
ABC' is not available.  The reason is around these parts there are so many
different approval methods for so many different areas that I really need to
have something that can be setup and used anywhere in Axapta, basically with
such a solution it would be a first step to providing some form of process
control in Axapta :)) (yes I am dreaming big I know but surely where there
is a will there is a way right!?).

Thanks alot for your help
James


-----Original Message-----
From: Malcolm Burtt [mailto:[EMAIL PROTECTED]
Sent: 14 February 2005 20:55
To: development-axapta@yahoogroups.com
Subject: RE: [development-axapta] Dynamic form changes possible?


Hi James

You can do that sort of thing by placing your code in the date source's
Active() method. If the users are creating new records and you want to
enable/disable controls as fields are filled in (i.e. rather than
waiting until the record is saved), then you may also need to put some
code in the date source fields' modified() methods.

Doing it that way shouldn't require any screen redraw so long as you
only disable the controls and not make them invisible or dynamically
add/remove them.

Regards

Malcolm Burtt
Global IT Group
"Business Solutions designed for YOUR business processes"
Global IT Group is the trading name of Touchstone Global Business
Solutions Ltd. and is part of the Touchstone Group PLC.

      -----Original Message-----
      From: James Flavell [mailto:[EMAIL PROTECTED]
      Sent: 14 February 2005 08:54
      To: development-axapta@yahoogroups.com
      Subject: [development-axapta] Dynamic form changes possible?
     
     
     
      Hi everybody,
     
      I hope somebody can help me to know is it possible to control
what is
      displayed on a form (e.g. disable a button) based on the value
in a record's
      field?
     
      I would like to be able to make a general solution whereby I can
setup that
      on a given form certain controls (such as posting button) are
not available
      unless the record the user selects has its approved field filled
out.
     
      I have looked through the classes SysSetupForm, SysSetupFormRun
and
      SysSecurityXXX but cannot work out exactly where Axapta checks
and sets form
      controls and so hope someone can assist me a bit.  I do not know
if my
      solution is pratical in terms of does Axapta do anykind of
'redraw' of the
      form for every selected record and also whether the performance
will be
      unbearable with such a redraw???
     
      Also any explanation of how the security settings or a user are
stored would
      be great as I guess I would need to use similar methods.
     
      Thanks
      James
     
     
     
     
     
     
     
     
Yahoo! Groups Sponsor     
ADVERTISEMENT


<http://us.ard.yahoo.com/SIG=129fsl97v/M=298184.6018725.7038619.3001176/
D=groups/S=1705006764:HM/EXP=1108461634/A=2532114/R=2/SIG=12k8uctm2/*htt
p://clk.atdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=110837523
4000453>

<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=group
s/S=:HM/A=2532114/rand=219477897>      

     
  _____ 

      Yahoo! Groups Links
     

      *      To visit your group on the web, go to:
            http://groups.yahoo.com/group/development-axapta/
             
      *      To unsubscribe from this group, send an email to:
            [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
             
      *      Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]



Yahoo! Groups Sponsor     

ADVERTISEMENT



<http://us.ard.yahoo.com/SIG=1299gvvrn/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705006764:HM/EXP=1108469016/A=2532114/R=2/SIG=12kko608t/*http://clk.
atdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108382616750191>

<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2532114/rand=743472821>      


  _____ 

Yahoo! Groups Links


*      To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
 

*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 

*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]





Yahoo! Groups Sponsor
ADVERTISEMENT


Yahoo! Groups Links

Reply via email to