fix custom field to_record

It was broken in commit 870758e.