Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Creating email with Web API automatically adds signature

(0) ShareShare
ReportReport
Posted on by 5

I am using the following to create a new email in Dynamics 365:

export const createEmail = (
  subject: string,
  description: string,
  trackingToken: string | undefined,
  caseId: string,
  emailId: string,
  partyData: any[],
): JQuery.jqXHR => $.ajax({
  url: `${apiBaseUrl}/emails?$select=activityid,_ownerid_value,createdon,subject,statuscode,directioncode,sender,attachmentcount,
trackingtoken`,
  type: 'POST',
  global: true,
  headers: {
    'Prefer': 'return=representation'
  },
  dataType: 'json',
  contentType: 'application/json',
  data: JSON.stringify({
    subject,
    description,
    trackingtoken: trackingToken,
    'regardingobjectid_incident@odata.bind': `/incidents(${caseId})`,
    'parentactivityid@odata.bind': `/emails(${emailId})`,
    email_activity_parties: partyData,
  }),
});

The new email is meant to be a reply to customer's incoming email. In the description parameter I'm passing the user's signature, because I need to add a separator between our response and the original email thread. However, the resulting email in Dynamics 365 has the signature I provided in the description, and another automatically-added signature. Is there a way to prevent Dynamics 365 from adding signatures to emails?

  • Suggested answer
    Leco Lv Profile Picture
    Leco Lv on at
    RE: Creating email with Web API automatically adds signature

    Hi partner,

    I think Naveen is right, the signature is not auto filled when the value is NO. Or you can delete the signature template.

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Creating email with Web API automatically adds signature

    Hi Kentico,

    Have you tried setting default template to no? I believe it should work 

    pastedimage1675186754196v1.png 

  • Kentico-EricD Profile Picture
    Kentico-EricD 5 on at
    RE: Creating email with Web API automatically adds signature

    Yes, it looks like Dynamics 365 is applying the user's signature to the new email. However, I'd like to prevent that from happening, do you know a way?

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Creating email with Web API automatically adds signature

    Hi Kentico-EricD ,

    I think your default email signature is applied to the email body.  

    Please check this link: www.forvis.com/.../how-add-custom-email-signatures-in-dynamics-365-crm

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,684 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans