CurrForm.CLOSE Giving Syntax Error...

XypherXypher Member Posts: 297
OnPush {

IF (STRLEN(Description) = 0) OR (STRLEN("Sender Name") = 0) THEN BEGIN
MESSAGE('Some fields that require input have been left blank.\' +
'Please make sure you have entered a "Description" as well as a "Sender Name".');
EXIT;
END;

RecordSaved := TRUE;
CurrForm.CLOSE;

}

When attempting to compile Navision gives me a 'There is a Syntax Error' message and brings the cursor to the end of '...CLOSE;'

Help!

[I need the current OnPush button function setup like this because I have code in the OnFormClose which looks to RecordSaved.
(I cannot use a PushAction for this button, unless someone knows a way to interrupt that.)]

Comments

  • garakgarak Member Posts: 3,263
    These error is not on your source. It can also be an wrong propertie or variable.

    Close the C/AL Editor and compile then. If the Cursor is still behind the CurrForm.Close, then there is an error on this trigger (variables, Properties, so on)
    Do you make it right, it works too!
Sign In or Register to comment.