How do I update custom fields in a LUA script

Document ID : KB000095394
Last Modified Date : 25/05/2018
Show Technical Document Details
We need to integrate our alarms to a third party tool.
We need to update the alarm with information based on robot and message so that
when the alarm gets to our third party application they can use the information
to properly route the alarms.
How can we update alarms user fields using NAS LUA script to be able to add
custom information in-order to be used by third party tools.
UIM 8.X+
NAS 8.X+
Below is a sample script to update custom1 field using nas.

msg = "Custom Value for Ticketing system"
event.custom1= msg
print("Script Custom 1" .. event.custom1)
return event