You need to sign in to do that
Don't have an account?
Sean Clark
Apex trigger to create a task and set Assigned To, to the MVP Owner
I have created an Apex Trigger to create a Task on the MVP Object but keep getting an error.
I am trying to link the Assigned To (Lookup(user,calender)) on the Task object to the MVP Owner (Lookup(user)).
Can anyone help correct this error?
I am trying to link the Assigned To (Lookup(user,calender)) on the Task object to the MVP Owner (Lookup(user)).
Can anyone help correct this error?
I belive this is the issue with permissions
All Answers
Please Change,
line no. 10 -: t.subject = 'You need to call '+ mvp.FirstName+ ' today';
line no. 11-: t.OwnerId = mvp.OwnerId;
There is now an error on Line no.11 - Variable does not exist: OwnerId
Line no.11 - Variable does not exist: OwnerId
The Owner I of the taks is a Lookup(User, Calander) field and the MVP Owner field is a Lookup(User).
Not sure where its going wrong or how to fix this.
Please try to replace Line No. 11 with:
Thank you for helping me with this!
i am replaced line 11 with what you advised but is still comes up with: Variable does not exist: OwnerId
I belive this is the issue with permissions
Thank you for this, it was indeed due to the permissions!
Thank you both @Raj & @Nishant for your help on this!