Hi,
I use the following code in Sales Orders to run the form 'Comment Sheet' when adding sales lines, to popup the form 'Comment Sheet' if any commet exists:
IF (CurrFieldNo = FIELDNO("No.")) AND ("Document Type" = "Document Type"::Order) THEN BEGIN
CLEAR(CommentLine);
CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Item);
CommentLine.SETRANGE("No.","No.");
IF CommentLine.FIND('-') THEN
FORM.RUN(FORM::"Comment Sheet",CommentLine);
END;
Now, I want the form NOT to be editable ONLY when called from sales lines.
Any suggestions?
Regards
Christian
0
Answers
FormVariable.SETTABLEVIEW(CommentLine);
FormVariable.EDITABLE(FALSE);
FormVariable.RUNMODAL();
"Profanity is the one language all programmers know best."
No. - OnValidate()
IF (CurrFieldNo = FIELDNO("No.")) AND ("Document Type" = "Document Type"::Order) THEN BEGIN
Any Comments();
END;
AnyComments()
CLEAR(CommentLine);
CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Item);
CommentLine.SETRANGE("No.","No.");
CommentSheet.SETTABLEVIEW(CommentLine);
CommentSheet.EDITABLE(FALSE);
CommentSheet.RUN();
…but the form ’Comment Sheet’ still pops up editable... ](*,)
Christian
Christian