(SOLVED) Code not working when previewing from dashboard

Thanks for this - will follow up internally.