Any query-based activity fails when run from a global action. The code is looking the current record, which doesn't exist.