Is there a way to get the Name from the OwnerId and Account__r.OwnerId in this query?
Select Id, Name, OwnerId,Account__r.Name, Account__r.OwnerId from Sede_BU__C WHERE RecordtypeId = '01224000000B3JL'
Thanks
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityIs there a way to get the Name from the OwnerId and Account__r.OwnerId in this query?
Select Id, Name, OwnerId,Account__r.Name, Account__r.OwnerId from Sede_BU__C WHERE RecordtypeId = '01224000000B3JL'
Thanks
You can access the name of the owner using Owner
as the name of the relationship between the objects.
Owner.Name, Account__r.Owner.Name
toString()
method is being applied to the object with the query results. When you are using the object, make sure the object isn't getting converted to a string. For example, if you are just logging the value, instead of logging results with a plus sign console.log("result" + result)
, use a comma instead: console.log("result",result)
– martin
Apr 11 '17 at 8:40