The following is a bit of PeopleCode I came up with to get a snapshot of the contents of a given Record object through PeopleCode. You might find this useful as a way of inspecting a record and its contents at a given point in time during PeopleCode execution.

This code utilises the WriteToLog function to output the snapshot to the Application Server log directory as a tracesql file.

Also you'll notice that it uses the Field class IsInBuf method to check if the field is actually in the buffer (i.e. has some data ) and only report the value of the record's field if it has data in the buffer. If not it will report it as (Not In Buffer).