What's the meaning of this code?

Marco_FerrariMarco_Ferrari Member Posts: 53
Hi all, starting from Navision 4.00, on posted sales document forms, for example form 130 (Posted Sales Shipment), has been added this code in the OnFindRecord trigger:

IF FIND(Which) THEN
EXIT(TRUE)
ELSE BEGIN
SETRANGE("No.");
EXIT(FIND(Which));
END;

Does anyone here know the meaning of this code? What this code do, or what bugs it corrects from the previous versions? I've noted that on SQL this implies more processing time when someone apply some filters on the form.

Marco
Marco Ferrari
Microsoft Certified Trainer
Cronus.it

Comments

  • bbrownbbrown Member Posts: 3,268
    This is done so that when a user filters for a non-existing document number NAV will remove that filter and display the first document found.
    There are no bugs - only undocumented features.
  • Marco_FerrariMarco_Ferrari Member Posts: 53
    Ok, I have a performance problem on this code. If I activate the Client Monitor for a company working on Navision 5.01 and SQL 2005 the systems tells me that only for going from one record to another one it uses 4600 ms!! Does anyone experienced the same problem and solved it?

    Marco
    Marco Ferrari
    Microsoft Certified Trainer
    Cronus.it
Sign In or Register to comment.