Wednesday, 10 November 2021

How to use html tag in salesforce task api?

I am using JSForce for make api calls on salesforce. I am trying to add task 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);
  })

It is working as expected except the body(Description) part contains some html tags so it does not parse it instead paste as it is in the comment section. Kindly help.



from How to use html tag in salesforce task api?

No comments:

Post a Comment