Add and edit record working mostly