Dynamically clearing and loading a record

m.pacanam.pacana Member Posts: 75
Given that i have set a source table on the form, is it possible to dynamically load a record from that table without the use of a lookup form? Meaning i'll retrieve a specific record thru coding? :?:

i cant use the GET function because the field im using for retrieval is not a primary key. When I use the SetRange function instead, i cant use the navigation buttons of navision anymore, since it doesnt get all the records already or the records are already filtered. I need help :D btw, im a newbie in using Navision. hehe! [-o<

Also, is it also possible to clear the form thru code? Clearing is same as when you press F3? :)

Thanks! \:D/

Comments

  • kinekine Member Posts: 12,562
    1) For getting some record, you can use your own new variable of type record (something like new "cursor" to the same table). Your problem is, that you are using Rec variable. Use another variable and you will not have the problems with navigating in the form...

    2) F3 is inserting new record. It means, it will INIT the Rec variable and clear the PK fields...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,307
    It's possible to do something like that, but requires a lot of extra programming, which leads to lots of maintenance calls from your customer complaining why it works on one form but not these other ones, and you have to add it to all of them for no charge.

    You're better off using standard Navision behaviour, and get used to the lookup functionality. Once you get used to it, it's not that annoying anymore.
  • m.pacanam.pacana Member Posts: 75
    Thanks a lot guys =D>
Sign In or Register to comment.