You need to sign in to do that
Don't have an account?

Custom Object to USER object SOQL
Hi,
my custom object has a lookup with USer object-- createdBY
i am trying to fetch the data from custom object as
createdby.name but the field is not fetching, please help with this.
Thanks
my custom object has a lookup with USer object-- createdBY
i am trying to fetch the data from custom object as
createdby.name but the field is not fetching, please help with this.
Thanks
Greetings to you!
SOQL Query to Get the CreatedBy and LastModifiedBy User Name:
Id = CreatedById
Name = CreatedBy.Name
If you are using a debug statement to view the output, then you will only see the Ids, however, you will be able to reference the actual names. Try like this:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
SOQL Query to Get the CreatedBy and LastModifiedBy User Name:
Id = CreatedById
Name = CreatedBy.Name
If you are using a debug statement to view the output, then you will only see the Ids, however, you will be able to reference the actual names. Try like this:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas