Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Problems Getting file Object From An External Application Empty Problems Getting file Object From An External Application

Fri 24 Jan 2020 - 10:41
I have created an external C# application that emails fee earners if their files, have not had a field ticked on a Mattercentre Form.
I get the file object using the following statement..
[FWBS.OMS.OMSFile myFile = FWBS.OMS.OMSFile.GetFile(theFileID);]
This works with most files but not all. If it fails I get the following exception...
[Error Message - ConstructAndSendEmail()
ERROR: An exception of type System.Exception
Occured in method: Void Load(Boolean)
In the following module:
ComplianceReminders.frmComplianceReminders
Message: Unable to Load Script creating Class OMS.Scriptlets._udTFLIMMT2GEUN]
After much investigation, I found that this only occurred if the Filetype had a taskflow in the File Management Application property
The list of DLL's referenced are..
[FWBS.Common
FWBS.Common.Licensing
FWBS.Common.UI
FWBS.DocumentPreviewer
Fwbs.Documents.JZipPackageProperties
Fwbs.Documents.MsgProperties
Fwbs.Documents.OfficeXpsProperties
Fwbs.Documents.OleProperties
Fwbs.Documents.Properties
FWBS.OMS.Addin.Security
FWBS.OMS.Addin.SecurityV2
FWBS.OMS.FileManagement
Fwbs.OMS.Workflow
OMS.Data
OMS.Library
OMS.UI]
Am I missing other DLL's or some other piece of code?
Looking in the forums seems to suggest I am missing the following statement...
public class CommonMethod : FWBS.OMS.FileManagement.ApplicationScriptType
{
}
Should I be surrounding my entire partial class...
public partial class frmComplianceReminders : Form
{
}
with CommonMethod so my code will work?
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Problems Getting file Object From An External Application Empty Re: Problems Getting file Object From An External Application

Fri 24 Jan 2020 - 10:44
Can you try using 'Assembly Binding Log Viewer' to see if an assembly can't be located. Also is there any information in the inner exception? http://msdn.microsoft.com/en-us/libra...

I've had an error similar to this before where there was actually an unrelatederror in a custom MatterSphere script I'd created. The scripting tool shouldn't have let it compile, but it did.

This is a supporting file management/Taskflow script. It was created under [new file management] in the admin kit and when compiled I get the statement [Build complete -- 0 errors].

Does it reference any custom or unusual dlls?
I don't want to lead you in the wrong direction, it just seems odd that you only experience the problem when accessing matters with a file management plan attached and the error references this script in particular.

Apart from standard .NET DLL's, all other DLL's referenced are listed in my original post.
I just used that particular exception example. Any file with a management plan attached, gives the error. Ths script listed as the problem varies as we use different management plans depending on filetype.

I have tried the Assembly Binding Log Viewer. When Executed with With my program, I got 4 binding failiures, but have absolutely no idea what it means as this is my first time using the tool.
Ths failiures did not occur with any of the FWBS DLL's but with DisplayName: ComplianceReminders.resources. I do not know if this is part of the problem or another problem totally.

Are you using V5? If so your exe will need access to the Fwbs.Framework.*.dlls . I would reference these in all apps.
You could also try copying your exe into the MatterSphere (Centre) program files directory and try running it from there. It should then be able to find all the dlls.

We are on version 4.7 but By adding the following referrences...
Fwbs.Framework.Design.dll
Fwbs.Framework.Library.dll
Fwbs.Framework.Winforms.dll
This solved the problem and the app now functions with filetypes with attached file management plans.
Thanks For everyones help
Edit 2013-04-11
Also had to add...
FPEIntegration.dll and in my code [using System.Xml;] as our milestone plans use Eforms.






Back to top
Permissions in this forum:
You cannot reply to topics in this forum