Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Salesforce Query File ID

I am trying to get the name of files saved inside a salesforce object. I do this query:

const files = await this.conn.sobject('ContentDocumentLink').find({
            LinkedEntityId: documentId,
            ShareType: 'V'
})

it provides me with :

  {
    attributes: {
      type: 'ContentDocumentLink',
      url: '/services/data/v42.0/sobjects/ContentDocumentLink/xxxxxxxxx'
    },
    Id: 'xxxxxxxxx',
    LinkedEntityId: 'xxxxxxxxxxx',
    ContentDocumentId: 'xxxxxxxxxxx',
    IsDeleted: false,
    SystemModstamp: '2022-02-24T12:03:04.000+0000',
    ShareType: 'V',
    Visibility: 'AllUsers'
  }

But all I have are the unique IDs of each file. I need the file names as well. How do I then query to populate and get the file name as well?

Thank you for your help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can try to perform SOQL Query to retrieve the name of the file.

this.conn.query("SELECT contentdocument.title FROM ContentDocumentLink where ContentDocumentId = 'SOME_FILE_ID'", function(err, result) {
  if (err) { return console.error(err); }
  console.log("result : " + result);
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!