web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    60,985 Super User 2025 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

  • Pushparaj P Profile Picture
    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
    60,985 Super User 2025 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;

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,921

#2
YUN ZHU Profile Picture

YUN ZHU 2,012 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,999 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans