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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Organization Admin Email Template, how to get it from code ?

(2) ShareShare
ReportReport
Posted on by 558
Hi,
 
In D365 FO, we have setup Org Admin > Setup > Organization Email Template. The EmailID is basically the only Email ID for this template. 
Question is, is there a function to get this by default. I currently using this function : var messageTable = SysEmailMessageTable::find(_emailId, _languageId);
 
But find it odd, since I need to specify the Email ID in my code, it is like "hardcoded" which I try to avoid. I mean can we just take whatever Email ID specified, since it is the only Email ID setup. If harcoded, lets say like I put SysEmailMessageTable::find("Workflow", _languageId);. IF someone setup with different name, my code will not working.
 
Thanks
 
 
Categories:
I have the same question (0)
  • Ken Manhattan Profile Picture
    558 on at
    It looks like we can add new Email ID, because there is New button in the Email setup like appear in the picture :
    But the screen is not in Grid like, so will only show 1, unless we go to Filter then we can understand we have other EmailId.
    It quite confusing as no one know except the person who maintain this Email Templates.
     
    Is there probably some setup parameter that able to record which one then will be the default for certain function or module or anything like ?
     
    My intention is only when I need to retrieve this email template in my code, I don't have to "hardcoded" the Email Id, but to retrieve this in some parameter.
     
    Thanks
     
     
     
  • Suggested answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    Click the Show list button to see the list of templates and to navigate between them.
     
     
    If you have ten templates and you want to get one of them in code, you'll either need a parameter where you select a default one, or a decision logic in code.
  • Ken Manhattan Profile Picture
    558 on at
    Hi Martin,
     
    Thanks again. I'm not noticing that there is a Show list button. 
    And for the parameter, yes, I've been thinking of that too, but means it will need customization.
     
    It's only just want to make sure there isn't such for standard OOTB.
    Also wondering why there is no such parameter.
     
    Thanks.
  • Verified answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    There are many parameters where you can select an email template ID; each of them for a particular business scenario.
     
    For example, here is one for project timesheets:
     
    I don't know anything about your business scenario, therefore I can't tell you whether there is a parameter suitable for you.
     
    You can use cross-references to see all the places where SysEmailId is used.
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans