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 8.1.1.11 SIA [23030] and later
Information in this document applies to any platform.

Goal

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?




SCRIPT
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%") });
}
 

Solution

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms