调用getEmbeddedObjects(); (Domino服务器API)返回错误结果 [英] Call to getEmbeddedObjects(); (Domino Server API) returns wrong results

查看:78
本文介绍了调用getEmbeddedObjects(); (Domino服务器API)返回错误结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从脚本发送包含附件(作为嵌入式对象)的邮件时,Domino服务器API getEmbeddedObjects();返回错误的结果(零). 尽管附件以EmbeddedOBject的形式发送,但getEmbeddedObjects();会返回ZERO. 邮件类型为NOT MIME.

The Domino server API getEmbeddedObjects(); returns the wrong result (zero) when a mail containing an attachment (as embedded object) is sent from the script. Though an attachment is sent as an EmbeddedOBject, getEmbeddedObjects(); returns ZERO. The mail type is NOT MIME.

这是一个Java应用程序.有没有解决此问题的方法?

This is a Java application. Is there is any workaround for this problem?

我从文件中取出尸体.如果正文是richtextitem,则我将调用getEmbeddedObjects(),尽管附件作为嵌入式对象存在,但该方法返回零.

I take the body from the document. If the body is of richtextitem, I call the getEmbeddedObjects() which returns zero though an attachment is present as embedded object.

推荐答案

浏览文档中的所有项目是否可能存在附件,却无济于事.您需要做的就是使用@AttachmentNames公式(通过Session对象的Evaluate()方法,使用Document参数)获取附件名称的集合,如果该集合包含多个空字符串,请使用getAttachment ()方法获取对应的EmbeddedObject的句柄.

Looking through all of the items in a document for the possibility of an attachment is doing a lot of work for nothing. All you need to do is get the collection of attachment names using the @AttachmentNames formula (available through the evaluate() method of the Session object, using the Document argument), and if the collection contains more than an empty string, use the getAttachment() method of the document to get a handle to the corresponding EmbeddedObject.

getAttachment()可以获取文档的任何附件,无论该附件是与RichTextItem还是V2样式的附件(由Web UI或转换外部邮件创建的)相关联的.并且永远不要害怕在适当的时候使用公式语言-它可以使您的生活变得更加简单.

getAttachment() can grab any attachment to a document, whether it's associated with a RichTextItem or a V2-style attachment (as would be created by a web UI or when converting external mail). And never be afraid to use Formula Language when it's appropriate -- it can make your life a whole lot simpler.

这篇关于调用getEmbeddedObjects(); (Domino服务器API)返回错误结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆