function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Trudy DobbelaereTrudy Dobbelaere 

CreatedById value changes


I have created the following trigger:

trigger CreateFolder on Case (after insert) {
  for (Case a : {
     ......  + a.CreatedById);

According to the debug logs when this trigger fires, a.CreatedById is returning value
Also I have a button that an end user can select after the case is submitted. This button references {!Case.CreatedById} . I assumed that I should get the same value back as I did when I called the property from the trigger. However, that is not the case. When I select the button, I get 005E0000000NXHp returned.

Why is there a difference between the CreatedById value returned from the trigger and from the button? I need an identical value returned in both cases.

Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
Hi Trudy,

Both Ids are same. 15 character id is case-sensitive where as 18 character id is case-insensitive id .

For more info please refer

If this answers your question mark this as best answer.