FormVar.RUNMODAL Shows all Records, not the Filtered Set

r44712r44712 Member Posts: 40
Hi all,

I am working on a solution that will let a user choose an alternative product if the one they are trying to order is not available.

If I use FORM.RUN(72379,TmpRecords) it shows the correct filtered set, however if I use MappedProductsForm.RUNMODAL(TmpRecords), it shows all rows in the table (which is wrong).

I need to use the latter method, so I can set a caption on the Form that describes why they are being prompted to choose an alternative.

Many thanks in advance.

Comments

  • kinekine Member Posts: 12,562
    Use
    MappedProductsForm.SETTABLEVIEW(TmpRecords);
    

    to set the filters on the form...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • r44712r44712 Member Posts: 40
    Sorry, forgot to add, I've already added:
    MappedProductsForm.SETTABLEVIEW(TmpRecords)
    

    and
    MappedProductsForm.SETRECORD(TmpRecords)
    


    The table is also temporary as its created on the fly, based on a number of paramters and to exclude duplicates, etc.


    Cheers!
  • kinekine Member Posts: 12,562
    If you are using NAV 5.0, use the SourceIsTemporary property on the form. Do not forget that temporary tables are workng in another way than common tables and in some situations you need to "copy" the records into rec one by one.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.