You need to sign in to do that
Don't have an account?
IT Admin 179
soql -> [object object] how to retrieve
when i do this query
SELECT campaign.name, FirstName, LastName, HasResponded , contact.owner.name FROM CampaignMember
//
the result on contact.owner.name 's value shows [object object] , how to retrieve the information of [object object] ?
SELECT campaign.name, FirstName, LastName, HasResponded , contact.owner.name FROM CampaignMember
//
the result on contact.owner.name 's value shows [object object] , how to retrieve the information of [object object] ?
This code will work fine and give you the desired result if you are planning to use it in Apex. Although if you want to view what is in the [object,object] result you can either use Workbench (http://workbench.developerforce.com) or you can also use a Force.com explorer (https://developer.salesforce.com/page/ForceExplorer) which will definitely provide you the desired result.
Hope this helps
Sandeep
We have an still an issue on this in Query editor so we have to go with workbench its also very simple:
But we can get the Owner Id in the Query Editor at Developer Console Using below:
SELECT campaign.name,FirstName,LastName,HasResponded,Contact.ownerId from CampaignMember
The people also faced the same issue here:https://salesforce.stackexchange.com/questions/17916/child-to-parent-query-object-object-is-the-result
the solution in the link also not get the name because i tried if you want please try.
But we can simply get owner name with help of Workbench so please follow the below steps:
1) GO TO -> https://workbench.developerforce.com/login.php
2) change the query settings to get the parent details:
3)Use this Query in the box: SELECT FirstName,LastName,HasResponded,Contact.owner.Name,campaign.name from CampaignMember
Can you please Let me know if it works or not!!!
If it helps don't forget to mark this as a best answer!!!
Thanks,
Raj