tag:blogger.com,1999:blog-2157078164517103759.post4542296288617603609..comments2023-07-31T03:31:57.774-07:00Comments on A Static State: Update SPListItem Created By and Modified By FieldsJason Apergishttp://www.blogger.com/profile/01817509015412502702noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-2157078164517103759.post-56388218030682370592009-08-25T13:37:59.844-07:002009-08-25T13:37:59.844-07:00This is a pretty old thing for me. I recall that ...This is a pretty old thing for me. I recall that for the situation I was in, it gave me the exptected results I needed.<br /><br />I will take your word for the test you are doing...Jason Apergishttps://www.blogger.com/profile/01817509015412502702noreply@blogger.comtag:blogger.com,1999:blog-2157078164517103759.post-51502378408993154992009-08-25T07:21:58.343-07:002009-08-25T07:21:58.343-07:00Hi ,
This solution wont work , if u run the code ...Hi , <br />This solution wont work , if u run the code under elevated privilage , Author filed can be updated as oUser , but Editor filed will be updated as system account cos , when code reaches the line ListItem.Update()<br />the code will run under system account, it means it will be updated as modified by system accountUnknownhttps://www.blogger.com/profile/01556396407835821533noreply@blogger.comtag:blogger.com,1999:blog-2157078164517103759.post-35825025054127627832008-04-28T06:11:00.000-07:002008-04-28T06:11:00.000-07:00Thanks a bunch.Thanks a bunch.Gauravhttps://www.blogger.com/profile/14848073339442729748noreply@blogger.comtag:blogger.com,1999:blog-2157078164517103759.post-9110836933672519602008-03-25T13:23:00.000-07:002008-03-25T13:23:00.000-07:00Here is an update on the problem I was having with...Here is an update on the problem I was having with running the update in the web part. Even though I was running under elevated privileges I needed to set AllowUnsafeUpdates = true on the Web. Make sure you set this back to false in a finally block.Jason Apergishttps://www.blogger.com/profile/01817509015412502702noreply@blogger.com