Updatedd Add / Attach code. 
Added a fragment for the Record action.