A record is only written to disk if the edited record flag is set. This flag is set when the record buffer is modified with a call to one of the deprecated CTRecord.SetFieldAs...() methods or by calling CTRecord.SetEdited() method. Use CTRecord.IsEdited() to check if a record has been edited or not.