Subform Page question

jelittlejohnjelittlejohn Member Posts: 61
edited 2013-08-01 in NAV Three Tier
I have a client that has recently been upgraded from 5.0 to NAV 2009. When they create a purchase invoice and enter the "Buy-from Vendor No.", we have code in the OnValidate of that field in the Purchase Header table that automatically pulls information from the vendor card and creates a default Purchase Line record for the invoice. This is all working fine. The Purchase Line is created and displayed in the RTC subform page. However, the focus (record pointer, whatever) in the subform page is on the new blank record below the default record we just created. In the classic client the record pointer was on the created record. Even though this is not a huge issue, the client would like for the behavior to be the same in the RTC. I've searched the forum and tried a few things unsuccessfully.

Does anyone have any ideas on how this might be accomplished?

Thanks in advance.
Jack Littlejohn
Clemson, SC

Comments

  • geordiegeordie Member Posts: 655
    I think it's related to SourceTablePlacement property, not available anymore in pages.

    My hint is to add a procedure in subpage to retrive the inserted record (with a CurrPage.UPDATE statement also) and call it in "Buy-from Vendor No." OnValidate page trigger.
  • jelittlejohnjelittlejohn Member Posts: 61
    I have tried a function on the subform involving both GET and FIND without any luck. I call it from the OnValidate of "Buy-from Vendor No." on the Page and all of my commands seem to be executing correctly and I have put Page.UPDATE commands in for both the Page and SubPage but nothing seems to move the record pointer to the record that I am looking for.
    Jack Littlejohn
    Clemson, SC
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    I was gonna say setselectionfitlter, but I see that its not supported on subpage view.
    http://msdn.microsoft.com/en-us/library/dd355387(v=nav.70).aspx


    In that procedure on the subpage, try adding a MESSAGE of the record, does it get the right record?

    Maybe you could play around with MARKEDONLY will trick the record to be selected?
    (Markedonly would have to be removed again somehow I expect...)
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
Sign In or Register to comment.