Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda