My Oracle Support Banner

CRM Desktop: How to add as msg file, only if all attachments are smaller than a limit? (Doc ID 1646174.1)

Last updated on DECEMBER 01, 2016

Applies to:

Siebel CRM Desktop - Version SIA [23030] and later
Information in this document applies to any platform.


How to add Email Attachments as msg file if all attachments are below a limit.

The MOS Document "CRM Desktop: How To Exclude The Addition Of Big Attachments From Emails To Activities (Doc ID 1582928.1)" describes how you can find the size of each attachment in an e-mail, to be able to only add attachments smaller than a given size. This is only applicable if you chose the alternative "Attach mail attachments as separate attachments".

We will not use that alternative, but the alternative "Attach mail as msg file". How can we add the msg file, only if all attachments are smaller than a limit?

The script for is placed in the config file business_logic.js, for "create_attachment_fn", function "create_or_uppdate":

if (AttachmentsHandling == 1) // attach-mail-attachments-as-separate-attachments // Updated in accordance with Doc ID 1582928.1
var attachemnts = ol.get_property("Attachments");
attachemnts = attachemnts != null ? attachemnts.toArray() : [];
for (var i = 1; i < ol.fcd_item.raw_item.Attachments.Count + 1; i++) {
var attach = ol.fcd_item.raw_item.Attachments.item(i);
if (attach.Size var proxy_attach = attachemnts[i - 1];
if (proxy_attach) {
create_or_update(proxy_attach, { "prefill_from_attach": true });

else if (AttachmentsHandling == 0 || AttachmentsHandling == null) // attach-mail-as-msg-file
var msg_content = ol.get_property("MsgFileContent");
var file_name = helpers.crear_filename(msg_content.Name);
if (file_name.toLowerCase() == ".msg")
file_name = "Untitled.msg";
create_or_update(msg_content, { "name": file_name, "filter": ctx.session.create_expression("CombinedFileName", "like", "%.msg%") });


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.