Error 1008 Unsafe Operation. An attempt was made to set a value into an application field that is disabled. This operation could compromise the integrity of the application.
You attempted to set the value of a field that was locked or disabled by the accounting system.
If Microsoft Dynamics GP application code disables or locks a field (the field’s Enabled property is False, or its Locked property is True), you cannot set its value. The accounting system disables fields when they don’t apply in a given situation, and locks fields to preserve the integrity of accounting data (such as document totals). However, you can set the value of fields you’ve disabled or locked through VBA.