Can someone explain the purpose of the code in OnFindRecord in Customer Card:
RecordFound := FIND(Which);
CurrForm.EDITABLE := RecordFound OR (GETFILTER("No.") = '');
EXIT(RecordFound);
It was introduced in version 4.00. It appears to cause performance issues in one of our databases and I can't see any adverse effects if I remove it (and local variable RecordFound!).
Perhaps it is used when Customer Card is opened from somewhere else - but where?
0
Comments
Thanks for the reply but I am not sure what you mean.
You can't set a filter for "No." anyway because it will be reset by
Form - OnAfterGetRecord()
SETRANGE("No.");
Any more ideas anyone?
What type of performance issues does this cause? It shouldn't.
If you filter for customer XXXXXXXYYYYYY and no such customer exists, your form will displayy a new record with XXXXXXXYYYYYY code. If you move to another field and type something your record might be inserted. So this code sets the form to non-editable if you filter for a customer that does not exist in order to avoid this.
Regarding the performance issue use your client monitor to see where the problem is.
Thank you both, this is all I need to know!