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 :
Customer experience | Sales, Customer Insights,...
Answered

Dynamic Email Signature

(0) ShareShare
ReportReport
Posted on by 160

Hi,

I've created a email signature that salespeople needs to use when sending emails from the CRM. It needs to be dynamic, so they can easily insert it. But I bumped in some problems.

I wanted to create it under email signature. But it seems like you can't create dynamic fields in email signature.

So I tried to create an email template. But subject is required. Which means that when I want to insert the template to an email. I get a question asking if I want to change the subject to the template subject. I think this can ba a problem if someone doesn't read the question and presses ok, and then sends out an email with an incorrect subject.

I tried creating a process, that I wanted to say "When email is created add email template, delete subject line." But seems like the entity for the quick create email in CRM exsist. Do you have any tips on how I can do this? 

Thanks,

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Filippa F,

    I haven't found any OOB way to do this. So I created an onchange event on Subject field of the Email Main form.

    Please see the following script:

    function onchange(executionContext){
    	var formContext = executionContext.getFormContext();
    	var subject = formContext.getAttribute("subject").getValue();
    	var email_template_used_subject = ["We haven't heard from you...","xxxxxxxxxxxxx"];
    	if(subject == null || subject == "" || email_template_used_subject.indexOf(subject) === -1){
    		return;
    	}
    	var emailId = formContext.data.entity.getId();
    	if(emailId != null && emailId != ""){
    		formContext.data.save().then(
    		    function success(){
    			    Xrm.WebApi.retrieveRecord("email", emailId).then(
    					function success(result) {
    						if(result['_templateid_value'] != null && result['_templateid_value'] != ""){
    							formContext.getAttribute("subject").setValue("");
    						}
    					},
    					function (error) {
    						console.log(error.message);
    					}
    				);
    			}, 
    			function (error) {
    				console.log(error.message);
    			}
    		);	
    	}
    }
    

    Result:

    Animation.gif

    However, it needs you add all your email template's subject into an array. You could have a try and hope it can help you.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans