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

290
Views
Subir foto de perfil a salecforce a través de jsforce

Quiero subir una foto de perfil a salecforce a través de jsforce, pero por alguna razón no puedo usar este código

 let fileOnServer = "./files/photo.jpg", // static photo url fileName = "Contact Picture", fileType = "image/jpeg"; fs.readFile(fileOnServer, function (err, data) { if (err) { console.log(err); res.status(404).send({ errorMessage: err }); } else { let base64data = new Buffer(data).toString("base64"); JSFORCE_CONNECTION.sobject("Attachment").create( { ParentId: "0034K000004ZpFcQAK", Name: fileName, Body: base64data, ContentType: fileType, }, function (err, ret) { if (err || !ret.success) { res.send("error"); return console.error("error", err, ret); } console.log("Created Successfully : " + ret.id, ret); res.send("created"); } ); } }); };```
about 4 years ago · Juan Pablo Isaza
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!