10-16-2012 09:45 AM - edited 10-16-2012 10:32 AM
We came across a very weird issue. We have an application that creates History (History Type, Attachments) and append it to the contacts. The attachment is a PNG file that is located in a public folder (Everyone, Full Control). This works fine on the previous versions but on the Sage ACT! Pro 2013 it is crashing Sage and throwing:
Additional information includes:
Problem Event Name: CLR20r3
Problem Signature 01: actsage.exe
Problem Signature 02: 15.0.301.0
Problem Signature 03: 502edee8
Problem Signature 04: System.Windows.Forms
Problem Signature 05: 4.0.30319.17451
Problem Signature 06: 4f6c38e6
Problem Signature 07: 93a
Problem Signature 08: 17
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 2057
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
If the attachment icon is clicked directly it opens without problems.
10-17-2012 07:00 AM
Is this a framework level application or a plugin? Are you able to create history items with other attachments?
10-17-2012 08:24 AM
This is a framework level application. It is completely outside Sage. Basically it just creates the History Items. I haven't tried with other attachments.
We have been using this application with previous versions in the past without any problem. We have just recompiled it changing the target to .NET 4.
The call to create the History item is something as below:
Act.Framework.Histories.History newHistory = this.m_actFramework.Histories.CreateHistory(contactToAmend, Guid.Empty, this.m_actFramework.Histories.GetHistoryTypes(), false, dtProcessed, dtProcessed, this.m_strFormName, Path.GetFileName(strImageFileName), docToLoad);
I believe that should be pretty straightforward.
10-17-2012 09:03 AM
I tested this method recently in version 15 and didn't have any issues so I know it should work.
I assume when you recompiled to .Net 4 that you also swapped out your references? When you debug through is it the CreateHistory call that's throwing the exception?
10-17-2012 09:39 AM
10-17-2012 10:35 AM
Ok understood, it attaches fine but you can't open the attachment.
Does this also happen with attachments not created by your application and have you tried with another file?
10-24-2012 12:29 PM - edited 10-24-2012 12:30 PM
Does this only happen for attachments created programmatically? or do you get the same behavior from attachments created within the application?
Also, does this only happen on either the documents tab or history tab, or both?