function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
munixmunix 

How do I get all the notes associate with an account

Is there a query i can all notes assocated with an account? if not, what is best of way to achive this ...

Thanks.

DevAngelDevAngel

Hi munix,

This is relatively simple.  You need to query the Note object using ParentID = <account id> as the criteria.

CjuonCjuon

I'm curious - what tool are you using?

I downloaded the soql explorer tool, and was unable to duplicate the query you described.  I tried:

Select Id, Name,Title from Note where Id='00100000000zAolAAE'

And received the error "Query failed: Invalid_field: Invalid name: name in Note"
I know that this ID, from the Account table is valid, and has notes attached.  Help?

On a related note, I'm playing around with this because what I REALLY want to do is pull a list of notes along with their associated account name.  If I was able to write a join, this would be my query:

Select Account.Name,Note.Title from Account,Note where Note.Title like 'Broker%' and Note.ParentId=Account.Id

How can I accomplish this, given that the tool doesn't appear to support joins, or support querying id fields?

 

DevAngelDevAngel

Hi Cjuon,

The Note object has no name field.

You wrote:

And received the error "Query failed: Invalid_field: Invalid name: name in Note"
I know that this ID, from the Account table is valid, and has notes attached.  Help?

You most certainly can query on ID and you can use the retrieve call with ids.