This blog will discuss different types of script needs in Record Producer
If you want to redirect the user after submitting the record producer from native view: producer.redirect = "catalog_home.do?sysparm_view=catalog_default";
If you want to redirect the user to portal: producer.portal_redirect = "sp?id=sc_home";
If you want to set some fields value : current.short_description = "Please reboot " + producer.cmdb_ci.getDisplayValue();
Put some work notes: current.work_notes = producer.variables.field_1 + '\n' + producer.variable.field2;