Can I run following code after login as customer portal user in apex controller?
task.WhatId = Object.id; task.WhoId = Object.Editor__c; task.Subject = 'Other'; task.priority= Object.Priority__c; task.status = 'Not Started'; task.description = 'New Work'; insert task;
I am getting error "Currently DML is not allowed". I want to create a task for customer portal user. Is that possible? I don't want show it to any user. I will just use it to send notification email. Is there any way to do so?