Create the write record layer method and object and use it