Required Filter Field not working

nikeman77nikeman77 Member Posts: 517
hi all,

for report 211: Customer - Payment Receipt, required filter field look up not working?! supposingly when user running the report, it will prompt to filter by customer no./ posting date/ document no.

but when i click on the document no., list box for me to select from (FORM Customer Ledger Entries) not appeared !

the standard version are not working too..

i check my customer ledger entry table, there's a LookupFormID - FORM Customer Ledger Entries is being set,

i am able to open up FORM Customer Ledger Entries in object designer..

Answers

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The lookup only works on the field "Customer No." as that field has a TableRelation set in the "Cust. Ledger Entry" table. The field "Document No." does not have a TableRelation set, so then no lookup is possible in this report.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • nikeman77nikeman77 Member Posts: 517
    hi Luc,
    thanks for replying, and from the system i need to set document no. as a PRIMARY key?
  • dansdans Member Posts: 148
    nikeman77 wrote:
    hi Luc,
    thanks for replying, and from the system i need to set document no. as a PRIMARY key?

    you're not supposed to change the Cust. Ledger Entry's Primary Key. it will break Navision.
    You need to handle the lookup trigger manually using coding.
    Microsoft Certified IT Professional for Microsoft Dynamics NAV

    Just a happy frood who knows where his towel is
  • nikeman77nikeman77 Member Posts: 517
    You need to handle the lookup trigger manually using coding.

    hi dans,
    don't quite understand that, dans..
    my assumption (correct me if i am wrong) i cant put document no. in required filter field, instead in the request form i need to create a text control
    and put the code in it?

    where can i get a reference of such coding ?
  • nikeman77nikeman77 Member Posts: 517
    hi dans,

    when i put the coding into it..
    i got an error:
    The type of the constant must be compatible with that of the Entry No. field, and the
    length of the constant must not exceed the length of the field.

    Type: Integer <-- Code
    Field: Entry No. <-- SInv55-138
    Table: Cust. Ledger Entry
  • dansdans Member Posts: 148
    nikeman77 wrote:
    my assumption (correct me if i am wrong) i cant put document no. in required filter field, instead in the request form i need to create a text control and put the code in it?

    that is correct.
    CustLedgEntryForm.LOOKUPMODE(TRUE);
    IF CustLedgEntryForm.RUNMODAL = ACTION::LookupOK THEN BEGIN
      CustLedgEntryForm.GETRECORD(CustLedgEntry);
      DocNo := CustLedgEntry."Document No.";
    END;
    

    above is just a rough code and need a little bit of fine tune.
    Microsoft Certified IT Professional for Microsoft Dynamics NAV

    Just a happy frood who knows where his towel is
  • nikeman77nikeman77 Member Posts: 517
    hi dans,

    -the CustLedgForm would be the default lookup form for cust ledger entry table?
    -thanks for pointing out in the primary key issues or i would be making a very serious mistake...of causing a duplicate entry number in cust. ledger entry table.. #-o
  • dansdans Member Posts: 148
    nikeman77 wrote:
    -the CustLedgForm would be the default lookup form for cust ledger entry table?

    Yup. Default standard one.
    nikeman77 wrote:
    -thanks for pointing out in the primary key issues or i would be making a very serious mistake...of causing a duplicate entry number in cust. ledger entry table.. #-o
    You're welcome :)
    Microsoft Certified IT Professional for Microsoft Dynamics NAV

    Just a happy frood who knows where his towel is
Sign In or Register to comment.