I have made the Interaction Log Entry table in NAV 4.0 (SQL 2000) editable so that the salesmen can enter directly into a tabular form.
Because I do not wish to affect any other functions, I have created a new form that is on the contact card and shows the editable form where the profile answers usually are.
I get an error as soon as any field is clicked to initiate a new entry, because the entry no. is 0.
I am attempting to have the entry no, increment to the next available when they access this form. I put the following code in the OnActivate trigger:
IF InteractionLogEntry.FINDLAST THEN BEGIN
"Entry No.":=InteractionLogEntry."Entry No."+1;
I am receiving an error when I try to compile that states, "You have specified an unknown variable FINDLAST Define the variable under 'Global C/AL Symbols'.
This wasn't what I expected, but I'venever used the FINDLAST function before.
Can someone explain how I can correct this error and capture the last Entry No. + 1 on new records?
0
Comments
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
If so, would I put something like:
IF InteractionLogEntry.FIND(+) THEN BEGIN
"Entry No.":=InteractionLogEntry."Entry No."+1;
Since you're using SQL, it's highly recommended that you upgrade your executables to at least 4.0 SP3 and up.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
"A value or expression was expected"
It then goes to the area of the code just after the + in the
FIND(+) THEN BEGIN
section.
Any ideas?
IF InteractionLogEntry.FIND('+') THEN BEGIN
"Entry":=InteractionLogEntry."Entry No."+1
End;
The key bit it is complaining about is the (+) not being ('+')
regards
Ian
Ian
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Thank you both for all your help.