Hi Guys,
I need to append a Tag to the email subject when I select Test Send.
For exemple: [Test] - <subject>
I tried to create a workflow to run when a marketing email send test record is created but it's not working.
Does anyone has any suggestion?
Thanks,
Miguel
Thanks!
It worked for me =)
Thanks!
It worked for me =)
Hi Partner,
We could import a solution called Ribbon Workbench if we would like to make customization on ribbon button, then we can add javascript web resource for button and let function executes when we click button.
Fortunately, client API also works in Marketing application form, so we can use Xrm.Page.getAttribute or formContext.getAttribute to get text in Subject field.
With this method Xrm.Page.getAttribute("msdyncrm_subject").getValue() we can get text in Subject easily.
Please do follow steps:
1. Add JS with function into your web resource
2. Import RW solution and open it in Settings > Customization
3. Find the Test Send button at Form Level
4. Click + symbol in COMMANDS menu to add your own JS function
5. You will get Test Send button properties when you selected it,
thenSet Command Id to Test Send button's Command Field and add your JS web resource.
Notes:
1. Call setValue() method has not effect on Subject field in ribbon(actually it worked in debugging, but value in input field not change) in my environment, so I append tag with native JS forcelly:
var input = parent.document.getElementsByClassName("inputAssist");
for (var i = 0; i < input.length; i++) {
input[i].innerText = "[Test] " + input[i].innerText;
}
2. If you use executionContext method, please read this article.
3. Your own JS function will replace original Quick Create function, my suggestion is that you could add a new button with your function on ribbon.
Regards,
Clofly
André Arnaud de Cal...
292,111
Super User 2025 Season 1
Martin Dráb
230,934
Most Valuable Professional
nmaenpaa
101,156