Select Row on Nav 2013 Subform page

jimmyfjimmyf Member Posts: 104
edited 2013-06-03 in NAV Three Tier
Is it possible to programatically Select Row on Nav 2013 Subform page. Essentially doing the same programatically as as clicking on a row with the mouse.
I have a requirement to create some action buttons which move a record up and down the sales order subform (I have acieved this by creating a new sort order integer field on the sales line table, added a new key to the table and sorthed the subform by this new key)
The functionality works fine however I need to manually click the record I am moving with the mouse before clicking the action button. I was hoping I can keep focus on the record i am moving in code.

Comments

  • Rob_HansenRob_Hansen Member Posts: 296
    Be very careful with this...using a sort order other than the primary key will break the AutoSplitKey functionality so that line inserts won't work correctly. Plus you have to update the printed document to use the new key as well. The AutoSplitKey is the biggest issue...so you'd need to block inserting lines and add a new function for that, which would insert new lines respecting your new sort order. I assume you've worked through that side of things.

    We created functionality along these lines for a client once...but we renumbered the primary key for the lines (and all related records) to implement it. The limitation was that lines could only be moved so long as nothing had been shipped on the document.
  • jimmyfjimmyf Member Posts: 104
    Hi there
    Thanks for your response. I did not change the primary key rather i added an additional key and sorted the sub form page on that.
    The autosplitkey functionality still works fine.

    The main reason for the post was to try and keep focus on the record that I am moving.
    Any ideas on that?
Sign In or Register to comment.