Hide the edit / read-only button

I think I'm doing this wrong but here is my scenario / question...

I created a new page where the employee should create an Incident Report. When the Incident is first created, the status is set to true (OPEN). When the status gets changed to false (closed), I want the page to become non-editable.

Unfortunately, I have a conflict happening with the edit button at the top of the page.

When the status is set to OPEN, each group's editable state is set to TRUE. 

When I change the status to CLOSED, I programmatically change each group's editable state is set to FALSE.

These 2 scenario work great when the page editable status is set to TRUE as all my fields toggle between editable and non-editable.

When the page is set to read-only, I cannot change it in code... the following does not seam to work on either PageLoad or OnAfterGetRecord Triggers

 

CurrPage.Editable(Status);

Hope someone has a simple answer... thanks

I'm currently on BC13.

Related
Recommended