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

Sharing is Caring!!! Share this with your friends!!!

submit to reddit