Options

Getting rec from sub-page

sabzamsabzam Member Posts: 1,149
edited 2011-01-18 in NAV Three Tier
Dear All,

I am trying to get the record being highlighted from the purchase lines but the record which I am constantly getting back is the first record of the purchase line for the particular invoice. I am using both a function in the subpage which returns back the Record as well as using the getrecord functions and each time getting the same answer. Has anyone ever met such an error?

Comments

  • Options
    fitolfitol Member Posts: 46
    Yes the error is that you are doing it wrong.
    You can not (from the main form) get a record from the subform. That simply does not work.
    Do not try to get the sub record from the main form, it will never work.

    You can only get the subpage record from a trigger on the subform iself, by using the subform's action menu.

    Perhaps MS will change this in the future, but right now that's how it works.
  • Options
    sabzamsabzam Member Posts: 1,149
    That's what I am doing, I'm calling a function in the sub-page but still am not getting the correct record.
  • Options
    fitolfitol Member Posts: 46
    And you are calling that function from where?
  • Options
    sabzamsabzam Member Posts: 1,149
    Form the main page; the header part
  • Options
    fitolfitol Member Posts: 46
    Then you did not read, or rather understand, what I wrote.
    Please read my first reply again.

    Note this part:
    You can only get the subpage record from a trigger on the subform iself, by using the subform's action menu.

    This means:
    YOU CAN NOT GET THE SUB-RECORD FROM THE MAIN FORM.

    Next time I'm going to yell even louder :)
  • Options
    afarrafarr Member Posts: 287
    Note that Mark Brummel had developed a workaround for this:
    http://dynamicsuser.net/blogs/mark_brum ... -pane.aspx

    This was mentioned in an earlier thread on the post:
    viewtopic.php?f=32&t=35876
    Alastair Farrugia
Sign In or Register to comment.