Показать сообщение отдельно
Старый 26.11.2018, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1198: Add email address to recipients in javascript
Источник: https://crmtipoftheday.com/1198/add-...in-javascript/
==============

The advantage of having access to friendly brainpower is that the problems are getting resolved much quicker. The disadvantage is that it breeds inattentive coding. Daryl “Always Raising” LaBar almost threw in a towel but recovered and redeemed himself with the snippet how to add an arbitrary email address to the list of the email recipients on the email form.

function appendToEmail(executionContext){var formContext = executionContext.getFormContext();// prior to v9: Xrm.Pagevar att = formContext.getAttribute('to'); // or 'cc'var emails = att.getValue() || [];emails.push({name: 'george@foobar.com', type: '9206'});att.setValue(emails);}Potential gotchas:
  • the property is type not entityType as one would expect
  • sending emails to arbitrary recipients must be enabled in System settings


(Facebook and Twitter Cover photo by Mathyas Kurmann on Unsplash)



Источник: https://crmtipoftheday.com/1198/add-...in-javascript/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.