Options

prevent accidental change on table content

dsatriadsatria Member Posts: 80
As IT support, we occasionally run a table (via Object Designer) for investigation purposes.
Is there a way to avoid unintended change on a field's content?
We're thinking of something like Object Designer form itself where we cannot modify a field until we press F2 (or click it again).

Comments

  • Options
    krikikriki Member, Moderator Posts: 9,090
    1) we all have that problem, so we have to be very carefull.
    2) if you change a field and you haven't left the field, you can use ESC to exit the field without changing it.
    3) if you are using the developpers license, you can create a form on-the-fly for the table you want to see and put property "InlineEditing"=Yes on the tablebox. In this way you cannot change the fields unless you hit F2. And you don't have to create a form for all the tables you MIGHT want to run.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    dsatriadsatria Member Posts: 80
    Hi, Alain!

    Thank you for your reply!

    Would you kindly share with us how to create such a form that can access content of any table a user may choose at runtime?
  • Options
    kinekine Member Posts: 12,562
    I think that Kriki means, that instead of run the table you can go to the forms, click new, use wizard to create new table form with all fields, change the property and run the form without saving... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    dsatriadsatria Member Posts: 80
    IC :cry:

    Does it also mean that there is no way we can modify SourceTable property at runtime?
  • Options
    krikikriki Member, Moderator Posts: 9,090
    No, you can't change the sourcetable-property at runtime.

    But since version 3.60 you have recordreference. So you might put the Sourcetable-property to Integer (=the integer table).
    On the form you might ask the user wich table he wants to see.
    Open a recordreference on that table and let the form (with OnFindRecord and OnNextRecord) take a record from that table.

    How to show the fields on the form:
    You have to define lot's of fields of type text (they can contain all types). In the OnAfterGetRecord-trigger, you can fill the variables.
    For the column-caption, I posted a method to use the captions you want, you can look at http://www.mibuso.com/forum/posting.php?mode=reply&t=6744 (I hope this URL works, if not search the forum for "CaptionClass").

    To put filters on the table, you will need an extra form in which the user can put them, and then set them on the recordreference.

    In all, if you want to do this, you will have some programming to do.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    dsatriadsatria Member Posts: 80
    Hmm :-k I think it will take some time for me to "digest" what you suggest since I'm still new on navision programming

    But it always pleasant to learn something new (except when we are overwhelmed by daily tasks :wink: )

    I'll post again as soon as I make progress
Sign In or Register to comment.