gr = client.GlideRecord(table)
gr.initialize()
gr.field = 'some value'
gr.get('non_existant_id')
We expect the gr.field to now be None -- in actuality it is still some value as the failed get() did not update _current.
Actual GlideRecord behaves in this matter:
let gr = new GlideRecord('incident')
gr.initialize()
gr.short_description = 'this is a test'
gs.info(gr.short_description)
gr.get('sys_id')
gs.info(gr.short_description)
When doing something as such:
We expect the
gr.field
to now be None -- in actuality it is stillsome value
as the failedget()
did not update _current.Actual GlideRecord behaves in this matter:
will give us