How to set the CreatedBy (and ModifiedBy) of records #98
-
I have a plugin which needs to look at the details of the user who originally created the record. In the same plugin I need to get details of the user who is performing the update. I can't work out how to do this either. I tried changing the callerid of the service but that doesn't seem possible. Sorry if I'm missing something obvious... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Ben! All read-only properties could be set using the brackets notation [] even if they're read only. Here's a sample of CreatedBy. Hopefully that will work! |
Beta Was this translation helpful? Give feedback.
-
Thanks @jordimontana82 - works a treat! |
Beta Was this translation helpful? Give feedback.
Hi Ben!
All read-only properties could be set using the brackets notation [] even if they're read only.
Here's a sample of CreatedBy.
https://github.com/DynamicsValue/fake-xrm-easy-core/blob/f343198c49c5eb68b1940173c7668b2505cf5b75/tests/FakeXrmEasy.Core.Tests/Query/QueryLookupTests/QueryLookupTests.cs#L71
Hopefully that will work!