Find your content:

Search form

You are here

Unable to select CaseComment CreatorName field


I am wanting to select the CaseComment CreatorName field as a part of a custom CaseComments VF page:

[SELECT Id, CommentBody, CreatorName
                        FROM CaseComment 
                        WHERE ParentId IN :relatedCaseIds]

but am getting the following error:

No such column 'CreatorName' on entity 'CaseComment'.

the docs for the CaseComment.CreatorName field says:

Name of the user who posted the question or reply. Only the first name of internal users (agents) appears to portal users in the feed. Chatter Answers must be enabled to view this field. This field is available in API version 26.0 and later.

I have checked and the VF page is using version 26.0.

I am selecting the CommentBody with no difficulties. Does anyone know why I might be getting this error?


Attribution to: Joe

Possible Suggestion/Solution #1

Actually there is a CreatorName field on Case Comments. This is very new though and only available in the API v26. It is also available if you have Chatter Answers enabled in the org (which requires at least one license to be provisioned).

CreatorName has been added to:

  • Question object
  • Reply object
  • Case object
  • CaseComment object

This allows you to have the name of the creator without having to query the user table. For portal users, only the first name of internal users will be visible though in the CreatorName.

Also we have added more fancy things to go along on the same 4 objects:

  • CreatorFullPhotoUrl
  • CreatorSmallPhotoUrl

which contain the photo of the URL to the photo of the creator. You can leverage this to build your own Q&A and Case Management.

Attribution to: Antony P.

Possible Suggestion/Solution #2

Enable chatter answers. Customize > Chatter Answers > Settings.

Attribution to: babooney

Possible Suggestion/Solution #3

There is no field called CreatorName.

There is a createdbyId something that's not shown on the field list is CreatedBy.Username or CreatedBy.Name depending on what you would like to see.

[SELECT CreatedById, CreatedBy.UserName, CreatedBy.Name FROM CaseComment]

Attribution to: Salesforce Wizard
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content