Dear All,
I have creates a Card Type Page(TandC,ID 50008) to Store some information against Sales Quote and Sales Order. I want that few fields/Controls should be non-editable when it being opened by Sales Order Screen. To do these I have written a Function in the Page(ID 50008). :
SetData(VAR Flag : Boolean)
EditableControl :=Flag;
And this EditableControl is used in Controls property(Editable) as required. ref
http://www.mibuso.com/forum/viewtopic.php?f=32&t=33236&hilit=currForm.Control+RTC
In the Sales Order Screen, I have added the below code in the Action to open the TandC Page:
<Action1000000002> - OnAction()
TESTFIELD("No.");
SalesLn.RESET;
SalesLn.SETCURRENTKEY("Document Type","Document No.",Type,"No.");
SalesLn.SETRANGE("Document Type","Document Type");
SalesLn.SETRANGE("Document No.","No.");
SalesLn.SETRANGE(SalesLn.Type,SalesLn.Type::Item);
IF SalesLn.FINDFIRST THEN BEGIN
SalesLn.TESTFIELD(SalesLn."No.");
SalesLineCopy :=SalesLn;
END
ELSE
ERROR(CSATEXT01);
CLEAR(TCForm);
TCTab.RESET;
TCTab.SETRANGE("Document Type","Document Type");
TCTab.SETRANGE("Document No.","No.");
TCForm.SETTABLEVIEW(TCTab);
Flag :=FALSE;
TCForm.SetData(Flag);
TCForm.RUNMODAL;
But it does not work.
I can open the Screen(TandC, ID 50008) from the Sales Order where it is fully non-editable and
I can get the required result from the same Screen (TandC, ID 50008) after clicking the New in Action Button.
How to solve these issue.
kindly reply.
Answers
already done.
issue is still there. ](*,)
When you go to edit mode, then you'll probably get the desired result.
|To-Increase|