调用getEmbeddedObjects(); (Domino服务器API)返回错误结果

编程入门 行业动态 更新时间:2024-10-20 16:32:38
本文介绍了调用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)返回错误结果

本文发布于:2023-11-26 18:20:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634666.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   服务器   getEmbeddedObjects   Domino   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!