User Defined Fields (UDFs) are special data storage artifacts which hold multiple values, hence specifying an index is mandatory while altering the same using Action Modify Object.
For example, a UDF which is associated at the Voucher Object is required to be altered. The same can be done as shown below:
[#Form: Normal Day Book]
Add : Button : UDFAlterButton
[Button: UDFAlterButton]
Key : F8
Title : "UDF Alteration"
Action : Modify Object : TestUDF[1].TestUDF : "Test"
Scope : Selected Lines
The above code modifies the UDF Values of all the selected vouchers in the Daybook on clicking the Button titled UDF Alteration. Since the above code is meant to alter only the first value of the UDF, specifying index is optional. So, the same can also be specified as TestUDF[].TestUDF.