23.01.2008, 22:30 | #1 |
Участник
|
axStart: mailing a PDF attachment
Источник: http://axstart.spaces.live.com/Blog/...C0A0!248.entry
============== First add the primary record type to the class EPSendDocument, method new case tablenum(WEBCaseStudy) : mailAddress = CustTable::find(record.(fieldnum(WEBCaseStudy,custAccount))).Email; custAccountNum = record.(fieldnum(WEBCaseStudy,custAccount)); documentTitle = fileName("@SYS13960"); reportName = reportstr(CustRevenue); break; default: Next fix a MS bug in the same method Add in the declaration of the new method this line //WEB MS BUG str path = SysEPDeployment::getSharepointTemplatePath() + #layoutsDirPath + #epDirPath + #imagesDirPath; //WEB MS BUG Next add bellows line for all comment out line of files and SendFile file = path+'\document'+time+#pdf; sendFile = path + '\'+documentTitle+#pdf; Finally you can mail it this way EPSendDocument document; ; document = new EPSendDocument(WebCaseStudy);//your table need property ‘titleField1’ to be set document.makeDocument(); EPSendDocument::sendMail(document.emailId(), document.parmMailAddress(), document.parmSendFileName(), document.mailLanguage()); if (document.isGenerated()) { winApi::deleteFile(document.parmFileName()); } Источник: http://axstart.spaces.live.com/Blog/...C0A0!248.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|