Scenario
The feature on Custom Records 'ENABLE OPTIMISTIC LOCKING' when ticked, is actually expected to throw the error:
“Unable to save record. Record was changed by a different user. Please reload and try again.”
Solution
As similarly described in SuiteAnswers 24215, enabling this option causes the system to check for conflicting updates whenever a user or script attempts to save updates to an instance of this custom record type. If another user or script has saved updates to the same custom record instance during the time that the first user or script was entering updates, the following message is returned:
"Unable to save record. Record was changed by a different user. Please reload and try again."
The Enable Optimistic Locking option is enabled by default for all custom record types created as of 2012.2 and later.
For backwards compatibility, this option is disabled by default for custom record types created prior to 2012.2.
You should enable this option, but first review any scripts that may be affected by this change and edit them as needed.