ctivate form controls by their IDs

NostaNosta Member Posts: 31
Hi,

I need to activate some particular control on the form by control's ID.
For instance:
CurrForm.Name.ACTIVATE;
I need to replace with code where field Name is referred by ControlID.
Is there any method like
CurrForm.CONTROL::15.ACTIVATE;
:?:

I don't know the forms list my solution will work with, but I can get a list of all controls and their IDs on the particular form. Thus, I can operate with ControlID only.

Answers

  • MBergerMBerger Member Posts: 413
    Unfortunately it isn't possible to refer to a control by it's ID. in NAV you will have to do everything by name.
    So the only way you could approximate what you want to do is by building a BIG case statement.
  • DenSterDenSter Member Posts: 8,304
    How do you get a list of controls on a form? There's no collection to pull from, are you using an external tool or something?
  • NostaNosta Member Posts: 31
    2 MBerger: bad news.. again.. thank you :D

    2 DenSter: I'm exporting objects to *.txt file and analyze it manually by parsing its content. Hard work, but by now, it's the only way to get a controls' list
  • DenSterDenSter Member Posts: 8,304
    Thanks for following up I appreciate it :mrgreen:
Sign In or Register to comment.