Added script code for copy/paste to detail view