Editable Field in an non editable page

MathanMathan Member Posts: 55
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.

Best Answers

Answers

  • MathanMathan Member Posts: 55
    Thank you for your response Mohana. I will check out your advice and let you know.
  • MathanMathan Member Posts: 55
    Thank you Mohana and Thank you Kishorm. I tried both your suggestions and it worked like a charm XD B) . And in future, if some extra fields happen to get added to the page. Then for that too the property should be changed in the future right ? or is there happen to be any other way around ?
  • KishormKishorm Member Posts: 921
    That's right, if you add any extra fields and you don't want them to be editable then you need to set the Editable property on those fields too
  • MathanMathan Member Posts: 55
    Aww. Much obliged. That was insightful XD.
Sign In or Register to comment.