+ Start a Discussion
Trudy DobbelaereTrudy Dobbelaere 

CreatedById value changes

Hello,

I have created the following trigger:

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

According to the debug logs when this trigger fires, a.CreatedById is returning value
005E0000000NXHpIAO
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.

thanks,
Trudy
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 http://www.salesforce.com/us/developer/docs/api/Content/field_types.htm#i1435616

If this answers your question mark this as best answer.

-N.J