Techiio-author
Started by Jofar ArcharNov 10, 2021

Open
How to use html tag in salesforce task api?

6 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 6 VIEWES SHARE

I am use of force to make API calls on salesforce. I am trying to upload venture using this API

const body = `<a href=${process.env.CONSOLE_URL}/myUrl/${id}>Click Here</>`
 const createObj = {
      WhoId: contact.Id,
      Subject: 'Call',
      CallDisposition : 'Call',
      Description : body
    };
 this.conn.sobject("Task").create(createObj, function(err, result) {
    if (err) return reject(err);
    return resolve(result);
  })

Its miles operating as expected besides the frame(description) part contains some HTML tags so it does now not parse it as an alternative paste as it's miles inside the commenting phase.

1 Replies

Techiio-commentatorPritam Dhar replied 23 days ago0 likes0 dislikes

The backend probably escapes the html characters when the comment gets uploaded as a security measure; either before it gets stored in the database or before it gets returned to the client.

This should logically be done to disallow users to upload malicious tags and is standard.

Instead of uploading html tags, I would suggest uploading markdown tags in the body(description) instead on which you can find info here.

Then you need a script to convert the markdown back to html before rendering it.

You must be Logged in to reply
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Recommended Blogs
1
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance