You need to sign in to do that
Don't have an account?
DF
Changing Records LastModifiedBy...any suggestions on why this isn't working ?
trigger Testmodify on Lead (after update) { User [] umail = [Select u.Email,u.Name from User u where id=:Trigger.new[0].OwnerId]; Lead [] lid = [Select Id from Lead where id=:Trigger.new[0].Id]; for (Lead tmp:lid) { tmp.LastModifiedById = umail[0].Id; update tmp; } }
Any ideas on why this code isn't being saved to the server ?
All Answers
John is correct, the LastModifiedById is a system field and cannot be updated via trigger.
-greg