October 18, 2013

CreatedById is null in trigger issue - workaround

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


No comments:

Post a Comment