New answers tagged sandbox-solution
use variable this this.Page.ClientScript... Make sure u have referred JS file in the visual webpart.
I know it's a little bit late for answering this thread, but this may be useful for someone with the same issue. Apparently, sandboxed solutions are somehow not running properly in Domain Controller servers. We need a little bit of coding, as it was pointed out in a previous answer, for sorting it out. Source
The cleanest way to solve this was in an Item Updated event receiver and with the workflow updating the item from an App Step. Chose this because setting permissions in SharePoint Designer Workflow (2013) using REST takes too many steps.
Top 50 recent answers are included