Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

How to Change the Subject in Email When Sending a PO

(0) ShareShare
ReportReport
Posted on by 205

Hi Experts,

How can we change the Subject of the Email, When Sending the PO through Mail,

Email.png

Thank You

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,194 Super User 2024 Season 2 on at
    RE: How to Change the Subject in Email When Sending a PO

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document-Mailing", 'OnBeforeGetEmailSubject', '', false, false)]

       local procedure OnBeforeGetEmailSubject(PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer; var EmailSubject: Text[250]; var IsHandled: Boolean);

       begin

           if ReportUsage = 6 then begin

               EmailSubject := 'New Email Subject';

               IsHandled := true;

           end;

       end;

  • Pushparaj P Profile Picture
    Pushparaj P 205 on at
    RE: How to Change the Subject in Email When Sending a PO

    Hi

    Thanks For the Quick Reply,

    I am New To development , Could You please Provide some Templates of the Code that i can Use?

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,194 Super User 2024 Season 2 on at
    RE: How to Change the Subject in Email When Sending a PO

    You have to use OnBeforeGetEmailSubject publisher in Document-Mailing codeunit and change the EmailSubject as per your requirement based on the ReportUsage

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans