<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged insert_attachment</title>
<link>https://overflow.efficy.io/?qa=tag/insert_attachment</link>
<description>Powered by Question2Answer</description>
<item>
<title>Error Object expected in InsertAttachment method</title>
<link>https://overflow.efficy.io/?qa=5475/error-object-expected-in-insertattachment-method</link>
<description>&lt;pre&gt;&lt;code&gt;var EditHandle = Database.OpenEditContext(ntDocu, K_DOCUMENT)
try {
    var fileKey = Database.InsertAttachment(EditHandle, ftInserted, myFilePath);  
    /* Code goes on after */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;I got the following error when I am using InsertAttachment method :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Error: Object expected
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I tried to replace ftInserted by the number 1, also tried various format for my filePath ( 'example.pdf', 'c:/mypath/example.pdf'&lt;/p&gt;

&lt;p&gt;I have no clue what the method is expecting at this point..&lt;/p&gt;

&lt;p&gt;Any ideas ?&lt;/p&gt;

&lt;p&gt;Efficy 10 Sp2&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5475/error-object-expected-in-insertattachment-method</guid>
<pubDate>Fri, 05 Jun 2020 16:32:56 +0000</pubDate>
</item>
<item>
<title>Insert an attachment through JSON?</title>
<link>https://overflow.efficy.io/?qa=5300/insert-an-attachment-through-json</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;does anyone know how to insert an attachment through JSON?&lt;br&gt;
I need this for a customer who wants to insert documents from a website.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen&lt;/p&gt;
</description>
<category>Remote API (JSON, SOAP, Node)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5300/insert-an-attachment-through-json</guid>
<pubDate>Wed, 12 Feb 2020 09:19:07 +0000</pubDate>
</item>
<item>
<title>Soap: Inserting an email with attachment via Soap Call</title>
<link>https://overflow.efficy.io/?qa=1589/soap-inserting-an-email-with-attachment-via-soap-call</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;

&lt;p&gt;I'm trying to save and email with an attachement in Efficy via soap. &lt;br&gt;
It seems to work fine but when I try to open the attachment ('msg' file) I have the following error:&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=15917386851006573239&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;Here is my call: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;SOAP-ENV:Envelope xmlns:efficy=&quot;http://www.efficy.com&quot; xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope&quot;&amp;gt;
&amp;lt;SOAP-ENV:Body&amp;gt;
    &amp;lt;efficy:logon database=&quot;PROD&quot; user=&quot;ipacic&quot; password=&quot;TheTable!&quot;/&amp;gt;
    &amp;lt;efficy:api id=&quot;1&quot;&amp;gt;
        &amp;lt;data operation=&quot;impersonateuser&quot; user=&quot;EHO&quot; id=&quot;129&quot;/&amp;gt;
    &amp;lt;/efficy:api&amp;gt;
    &amp;lt;efficy:edit entity=&quot;Mail&quot; key=&quot;0&quot; commit=&quot;true&quot; closecontext=&quot;true&quot;&amp;gt;
        &amp;lt;update tableview=&quot;0&quot;&amp;gt;
            &amp;lt;SUBJECT&amp;gt;This is a test mail&amp;lt;/SUBJECT&amp;gt;     &amp;lt;!--Subject of the email, cann't be changed afterwards by the user--&amp;gt;
            &amp;lt;TITLE&amp;gt;CLIENT NAME: This is a test mail&amp;lt;/TITLE&amp;gt;         &amp;lt;!--This can be a copy of the subject or a customized version, the user can modify this field in Efficy--&amp;gt;
            &amp;lt;OPENED&amp;gt;1&amp;lt;/OPENED&amp;gt;
            &amp;lt;MAILFROM&amp;gt;ppa@vogeleer.be&amp;lt;/MAILFROM&amp;gt;
           &amp;lt;MAILTO&amp;gt;ppa@efficy.com&amp;lt;/MAILTO&amp;gt;
            &amp;lt;MAILCC&amp;gt;&amp;lt;/MAILCC&amp;gt;
            &amp;lt;K_FOLDER&amp;gt;2&amp;lt;/K_FOLDER&amp;gt;      &amp;lt;!--2: Mail received - 3: Mail send--&amp;gt;
            &amp;lt;K_MAILTHREAD&amp;gt;0&amp;lt;/K_MAILTHREAD&amp;gt;  &amp;lt;!--Leave at 0--&amp;gt;
            &amp;lt;D_RECEIVED&amp;gt;04/05/2015 13:50&amp;lt;/D_RECEIVED&amp;gt;
            &amp;lt;MAILBCC&amp;gt;&amp;lt;/MAILBCC&amp;gt;
            &amp;lt;BODY&amp;gt;
                               &amp;lt;![CDATA[                
                                                       &amp;lt;html&amp;gt;
                                                                      &amp;lt;body&amp;gt;
                                                                                     &amp;lt;p&amp;gt;test&amp;lt;/p&amp;gt;
                                                                      &amp;lt;/body&amp;gt;
                                                       &amp;lt;/html&amp;gt;]]&amp;gt;
            &amp;lt;/BODY&amp;gt;       &amp;lt;!--Better to provide this value, it's easier for the user afterwards in Efficy--&amp;gt;
            &amp;lt;HTMLBODY&amp;gt;
                                                       &amp;lt;![CDATA[                
                                                       &amp;lt;html&amp;gt;
                                                                      &amp;lt;body&amp;gt;
                                                                                     &amp;lt;p&amp;gt;test&amp;lt;/p&amp;gt;
                                                                      &amp;lt;/body&amp;gt;
                                                       &amp;lt;/html&amp;gt;]]&amp;gt;
                                                       &amp;lt;/HTMLBODY&amp;gt;
        &amp;lt;/update&amp;gt;
        &amp;lt;insertattachment id=&quot;1&quot; type=&quot;1&quot; path=&quot;C:\Users\ppt\Documents\url.msg&quot;/&amp;gt;
        &amp;lt;updateattachment id=&quot;2&quot; key=&quot;0&quot; encodingkind=&quot;MIME64&quot;&amp;gt;dGVzdA==&amp;lt;/updateattachment&amp;gt;
        &amp;lt;insertdetail id=&quot;3&quot; detail=&quot;Case&quot; detailkey=&quot;627284&quot; maincomp=&quot;false&quot;/&amp;gt;
    &amp;lt;/efficy:edit&amp;gt;
    &amp;lt;efficy:logoff/&amp;gt;
&amp;lt;/SOAP-ENV:Body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Am I doing something wrong? &lt;/p&gt;

&lt;p&gt;KR...&lt;/p&gt;
</description>
<category>Remote API (JSON, SOAP, Node)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1589/soap-inserting-an-email-with-attachment-via-soap-call</guid>
<pubDate>Wed, 04 May 2016 14:29:51 +0000</pubDate>
</item>
<item>
<title>Efficy SOAP DLL: Webservice Inserting an Attachment</title>
<link>https://overflow.efficy.io/?qa=4/efficy-soap-dll-webservice-inserting-an-attachment</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I would like to know how to use to use the insertattachment function that is available in the Efficy SOAP dll.&lt;/p&gt;

&lt;p&gt;Best Regards,&lt;/p&gt;

&lt;p&gt;Stéphane R.&lt;/p&gt;
</description>
<category>Remote API (JSON, SOAP, Node)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4/efficy-soap-dll-webservice-inserting-an-attachment</guid>
<pubDate>Thu, 18 Sep 2014 13:44:34 +0000</pubDate>
</item>
</channel>
</rss>