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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

CRM Plugin for sendig emails

(0) ShareShare
ReportReport
Posted on by 10

We ad a requirement where in if the To recipient ids some email lets A@gmail.com we need to replace with B@gmail.com when email arrives at crm.For this reason we wrote a plugin which does this job.The problem in the plugin is if Torecepients is coming as more than 20 recepients then its not creating email message.Also no errors are stored in tracing.This plugin which sends email is written in preopreation create until 20 recepients it works if there more than 20 recpeints then email message is not getting created.

If I keep trace before the target.torecepients where im assigning the recipients in the plugin the trace is appearing.For example below is the code snippet.

if (!isEmailFound)
                            {
                                updatedToRecepients.Append(addressUsed).Append(";");
                            }
                        
                        Tracing.trace($"updatedToRecepients before"+ updatedToRecepients.ToString());
                        target.ToRecipients = updatedToRecepients.ToString();
                        Tracing.trace($"after" + updatedToRecepients.ToString());
if there are more than 21 recepients then bfore and after are getting traced with the 21 recepients or more than 21 recpients but the email message is not getting created.For 20 recpients email messages are gettingcreated.Any ideas why email message is not created for more than 20 reciepients ?
I have the same question (0)
  • rajesh461 Profile Picture
    10 on at

    Got the below issue

    EmailPlugin - Message: exSystem.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: A validation error occurred.  The length of the 'torecipients' attribute of the 'email' entity exceeded the maximum allowed length of '500'. (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).; in context of running online , running synchronius

  • Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    To fix this issue navigate to Settings-> Customization->Customize the system->Entity->Email->Fields and increase field length.

    Please see below.

    CQ2.PNG

    Please mark my answer verified if I were helpful!

  • rajesh461 Profile Picture
    10 on at

    This out of box field we cannot update it.Already verified it.

    Torecepients we cannot send more than 500 characters.if there are more than 500 characters we are trimming it to 500 characters so thta error is not thrown this is working.

    Not sure why outofbox for torecepients is implemented like this even if we trim its taking all the recepients in to field as outof box is working in this scenario

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 48 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans