Hi everyone,
I have taken the sales order page 42. Such that when the status is 'Open' every field should be editable. And when the Status is 'Released', then all the fields should be Non-editable except that Posting Date and Order Date should be Editable. However, I am unable to get the editable field for the non-editable condition of the page. As even the editable field appears to be Non-editable.
I have gone through various old post for forms and i came up to this.
I have created a boolean variable and declared it false on the OnOpenPage trigger
fieldeditable:=FALSE;
I have set the editable property of the Dates as fieldeditable.
This is the Condition:
IF CurrPage.EDITABLE(Status = Status::Open) THEN BEGIN
CurrPage.EDITABLE(TRUE);
fieldeditable:=TRUE;
CurrPage.UPDATE();
END
ELSE BEGIN
IF CurrPage.EDITABLE(Status = Status::Released)
THEN BEGIN fieldeditable:=TRUE;
CurrPage.EDITABLE(FALSE);
CurrPage.UPDATE();
END
END
Could someone throw a light on where i am going wrong...?
Thank you.
0
Answers
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
if status = Status::Released then
fieldeditable := False;
add fieldeditable to all fields except 2
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Also, you need to make sure that you have set the IncludeInDataSet property to Yes on the fieldeditable variable and then set the Editable property to fieldeditable (on all fields except the 2 date fields - as stated by Mohana)