CreatedById is null in trigger issue – workaround October 18, 2013June 9, 2022InfallibleTechie Admin CreatedById will be populated in a record only after insert operation. Before insert, the CreatedById will be null. In the is case, we can use UserInfo.getUserId() which returns the current User Id. Check the below link for sample code https://infallibletechie.com/2013/10/how-to-get-current-user-id-using-apex.html Cheers!!!