Assign static variable into a field. Variables declared with the static statement retain their values as long as the code is running.
How to set static assignment
Create a new behavior. Put the appropriate caption. Click Action wizard.

Click Create an action.

Click Static assignment.

In this example, we going set Created by field to Azri. Click OK.

Click Save changes.

Click View code. Just leave it as it. Check syntax, if no error then click Save and close.

Click Create now.

How it look in the form:
Before:
Log in as Administrator, by default M5 set Created by to the current user (Administrator).

After:
Log in as Administrator, Created by changed to Azri. Whoever are sign in, the value (Azri) is still the same.

Comments