Lock form when go to next record?!

Hi,

Today I have a locking-functionality on my Customer form. As you can see the form is locked as default.

To open for edit you have to press a buttom “Lock up”. When the form is closed and reopened it gets automatically locked again.

Customer-form current setup:

Form - OnOpenForm()

CurrForm.EDITABLE := FALSE;

Form - OnActivateForm()

CurrForm.EDITABLE := FALSE;

LockUpButtom - OnPush

CurrForm.EDITABLE := TRUE;
CurrForm.UPDATE(FALSE);

I would like it to continue to be locked as default when opened, but automatically get locked if the user search og scroll to the next customer.

How can that be implemented?

Best Regards

//Mads…

Hi Mads,

Welcome to the Dynamics User Group!

Putting the CurrForm.EDITABLE := TRUE; in the OnAfterGetRecord trigger should work

Thank you :slight_smile:

No, that didn’t solve the problem.

Any others suggestions?

Hi Mads,

sorry the code should have been CurrForm.EDITABLE := FALSE; (Cut and pasted from wrong line [:$] )