Factbox getselectionfilters/setselectionfilters

CaponeCapone Member Posts: 125
edited 2012-01-26 in NAV Three Tier
Hi experts!

I'm trying to create a factbox that shows the amount of the marked lines in the page. Is this possible?

Problem is that I can choose to have the same filters in the factbox by choosing correct datalink and this will show the same data in the factbox that is on the selected line in the form. But how do I do so it will show for instance the total quantity of the selected lines in the form?

First I thought that I could set a reference to the parent record and use getselection on that but then I realised that get/setselection is used on Currpage/Currform and unfortunately you can't create references to other pages/forms.
Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?

http://www.navfreak.com

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I think that without singleinstance codeunits and client-addins this won't work.
  • CaponeCapone Member Posts: 125
    Hi Mark!

    Thanks for you answer but how would you solve it with a single instance codeunit?
    I'm guessing you would do something like this:

    Encapsulate the form in the single instance codeunit and then open it from the codeunit
    And when you want to get the selected records from the form to the factbox you call the codeunit that returns the getselection of the form.
    Hello IT, have you tried to turn it off and on?
    Have you checked the cables?
    Have you released the filters?

    http://www.navfreak.com
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yeah, something like that.

    You could have a global variable of the same record type as a temp table in the singleinstance codeunit and populate these from the main page.

    From the factbox you can create an add-in that refreshes the factbox if required and reads from the singleinstance codeunit.

    Not realy nice coding but it should work.
Sign In or Register to comment.