How to run a table?

alex80alex80 Member Posts: 4
Hello,

I would like to have a functionality similar to Object Designer, which is able to Run every table, even those without LookUpForms defined.

I tried to design a universal LookUp Form based on RecordRef, but can't get the TableBox to show the table data. Is there a way to set an array of FieldRefs as SourceExpressions for the TableBox columns?

I've read about WSH.SendKeys pressing buttons on Object Designer but I don't think it's an elegant solution.

Can somebody please give me a hint on how to do this in a C/AL way?

Comments

  • krikikriki Member, Moderator Posts: 9,110
    You might create a new table with some fields in it.
    In the OnOpenForm, you can open a recordreference on the table you want to show.
    In the "Form - OnFindRecord","Form - OnNextRecord"-triggers you can put some code that uses the recordreference to navigate and take the fields from there and put them in the fields of the sourcetable of the form.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • David_SingletonDavid_Singleton Member Posts: 5,479
    alex80 wrote:
    Hello,

    I would like to have a functionality similar to Object Designer, which is able to Run every table, even those without LookUpForms defined.

    WHY? [-o<

    Just hit
    <SHIFT>+F12
    <ALT>+"B"
    <ALT>+"R"



    that works for me
    David Singleton
  • DenSterDenSter Member Posts: 8,305
    My thoughts exactly. Why create something that is just like the object designer if you already have the object designer?
  • garakgarak Member Posts: 3,263
    It's very easy to show table datas in a universal form ;-)

    But i doesn't understand, why do you need this in your case? Please explain this :shock:

    Regards
    Do you make it right, it works too!
  • alex80alex80 Member Posts: 4
    Sure, I'll explain :) .
    I need this because I want to have a better Object Designer
    (something like this one) to replace the Object Designer all together.
  • DenSterDenSter Member Posts: 8,305
    what's wrong with the regular object designer?
  • garakgarak Member Posts: 3,263
    mhm, so i also doesn't understand your problem. Whats wrong with the original Object Designer ..... ok, looks not very nice, but it do this what he should do. Note, NAV is not a Development Suite like VS ;-)
    Do you make it right, it works too!
  • alex80alex80 Member Posts: 4
    What's wrong?
    Let me give you an example.
    In Object Designer you can create a new object by entering a new ID in the ID column. After this you cannot run or design the object because it has a NULL BLOB reference. I want to set InsertAllowed to No in my Object Designer.
    Furthermore, I want to run objects by pressing F5 and design them by pressing F9. Then I want to define a key shortcut to Export and Import menu option. Then I want to have a button for the "Show Marked Only" filter. And these are only few enhancement ideas...

    Of course I know it's not a development environment but I recently became a developer and I want to have one. So the first thing that came to my silly head was to duplicate the functionality of Object Designer and to make it work for me. This isn't a crime, I hope.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    8><

    actually no point.....
    David Singleton
  • DenSterDenSter Member Posts: 8,305
    alex80 wrote:
    This isn't a crime, I hope.
    Nope not a crime at all. Go ahead and do whatever you want, I was just curious about your reasons that's all :mrgreen:

    I don't agree with your story though. In my opinion I would just learn how to use C/SIDE instead of trying to change it. You won't add capabilities anyway, just different shortcuts to things that are already there.

    Run objects -> Ctrl+R from designer, Alt+R from the object designer
    Design objects -> Alt+D
    F9 already has a function, so by adding YOUR function, you actually take away functionality. How are you going to open the C/AL editor once you're in the designer? F9 again? won't that confuse people?
    Export objects Alt+F, T
    Import objects Alt+F, O

    It's all already available, you just don't know how. Trust me, your time can be used MUCH more effectively. I suggest you learn how and focus your energy on learning how the application itself works. Post a sales invoice and debug it, see which code is executed.
Sign In or Register to comment.