Announcements
No record found.
I want to send any type of file such as excel, text , etc in attachment when sending mail through x++ ,which i will upload in the dialog box using edt "FILENAMEOPEN"...
That means i will upload my file in dialog box , and want to send that attachment through email in x++
All right, and which part do you need our help with?
A trivial implementation could be something like this:
FileUploadResultBase result = File::GetFileFromUser(); if (result.getUploadStatus()) { SysMailerMessageBuilder builder = new SysMailerMessageBuilder(); builder.addTo(...); builder.addAttachment(result.openResult(), result.getFileName()); SysMailerFactory::sendInteractive(builder.getMessage()); }
hello Martin,
I am getting this error when i am selecting the file to upload
"The FileUpload Strategy Class you selected does not exist"??
As well as the code is below -:
dialogfieldfile = dialog.addField(extendedTypeStr(FilenameOpen),"File Selector");
FileUploadResultBase result = File::GetFileFromUser();
if (result.getUploadStatus())
{
builder.addTo(getvalue);
builder.setFrom(sysEmailParameters.SMTPUserName);
builder.addCc(cc);
builder.addAttachment(result.openResult(), result.getFileName());
}
probably you would want to have a look at new way of uploading files. as the same app is used in cloud now, as well for on-prem, therefore legacy code cannot be used as in old days. please have a look at next discussion.
community.dynamics.com/.../812848
Hi UDIT,
Please change
to
FileUploadTemporaryStorageResult result = File::GetFileFromUser() as FileUploadTemporaryStorageResult;
I am having this requirement , on dialog i have 3 fields in which on one filed i need to upload the file and send it as attachment
hi will.
how will it get my uploaded file , which i have uploaded in dialog field of mine ??
Hi Udit,
This framework dose the job and stores your file to the temporary blob storage.
Not its not working still same error,..
Sorry I gave you the wrong code,i have edited it, please try it again.
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 509 Super User 2026 Season 1
Giorgio Bonacorsi 375
Adis 268 Super User 2026 Season 1