0

In my org, there is a custom object named Customer which has a lookup to Contact. I am creating a fieldset for the object. In the fieldset, I wish to add the name or alias of the person who created the contact. If I add Created By, it comes as Contact_ID__r.CreatedById in apex. I want the name or alias and not the ID.

I referred to the salesforce documentation. I found the following sentence:

NOTE Only fields available in the API can be added to field sets.

Is it the case that Created By name or alias is not available in the API? Is there a way I can add it to the fieldset?

Please see the screenshots:

sc1

sc2

1 Answer 1

1

Contact Created By is a lookup to User object and hence, (field api name: CreatedById) displays the referenced record ID. This is the default behavior of audit fields like CreatedById & LastModifiedById in Salesforce.

You need to create a formula field in Contact object with return type as text and value as CreatedBy.Alias. You can then use this formula field in the field set of custom object.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .