SAP B1 9.0: SBO_Application = SwissAddonFramework.B1Connector not exist

Emanuele Croci

Dear all,


I installed SAP B1 9.0 and Coresuite SwissAddon 32 and 64 bit.


 


Now, I need to recompile my own addon based on Coresuite Framewok, but I have a compiler error:


B1Connector is not a component of SwissAddonFramework


 


For this command:


SwissAddonFramework.B1Connector.GetB1Connector().Company


 


 


Please, can someone explain to me what class should I use now?


 


Best regards


 


    Emanuele


 


 


Emanuele Croci

Dear all,


I solved my issue using .Net Framework 3.5 and recompiling the project.


 


Now, I have an issue starting my SwissAddon module in SAP B1:


Could not load module <my module name>.


Coresuite will skip loading this module.


Message: Unable to cast object of type 'my_module.startup' to type 'SwissAddonFramework.PluginLoader.IPlugin'


 


 


It worked with SAP B1 8.82 version.


 


Please, can someone help me?


 


Best regards


 


    Emanuele

Emanuele Croci

Dear all,


here the source code...


Can someone tell me what has changed in the SwissAddonFramework for the module registration?


Please, it's very important for me.


I need to recompile my SwissAddon module..


 


Imports SwissAddonFramework.PluginLoader


Public Class startup

    Implements IPlugin


    Public Sub ApplicaitonChanged() Implements SwissAddonFramework.PluginLoader.IStarterPlugin.ApplicaitonChanged


    End Sub


    Public Sub Install() Implements SwissAddonFramework.PluginLoader.IStarterPlugin.Install


    End Sub


    Public Sub LanguageChanged() Implements SwissAddonFramework.PluginLoader.IStarterPlugin.LanguageChanged


    End Sub


    Public Function PluginName() As String Implements SwissAddonFramework.PluginLoader.IStarterPlugin.PluginName

        Return "my_app"

    End Function


    Public Function PreInstall() As Integer Implements SwissAddonFramework.PluginLoader.IStarterPlugin.PreInstall


    End Function


    Public Sub Run() Implements SwissAddonFramework.PluginLoader.IStarterPlugin.Run

        cbApp.BeOne.ConnectToSwissAddOnFrameWork()

        cbApp.Run()

    End Sub


    Public Sub Terminate() Implements SwissAddonFramework.PluginLoader.IStarterPlugin.Terminate


    End Sub


    Public Function Version() As String Implements SwissAddonFramework.PluginLoader.IStarterPlugin.Version

        Return cbApp.Version.ToString

    End Function

End Class




....

....



    Sub ConnectToSwissAddOnFrameWork()

        Dim uiAPI As New SboGuiApi


        SetCompany(SwissAddonFramework.B1Connector.GetB1Connector().Company)

        SetApp(SwissAddonFramework.B1Connector.GetB1Connector().Application)

    End Sub


....

....


 

Emanuele Croci

Please, can someone give me a suggestion about new way to connect a module into Coresuite SwissAddon?

Paolo Manfrin

Hi Emanuele,


the IPlugin interface is not supported anymore.


Please remove the reference to the PluginLoader dll and reference the IModule interface included in the SwissAddonFramework.


 


hth


paolo


Emanuele Croci

Dear Paolo,


I just tried it.


I removed the reference to PluginLoader.dll


 


but now, in the SwissAddonFramework namespace I cannot find the IModule interface.


 


In the previous version I had:


 


Imports SwissAddonFramework.PluginLoader

Public Class startup

    Implements IPlugin

...


...


 


 


Now, I try it:


 


Public Class startup

    Implements IModule        --> but compiler says: Type 'IModule' is not defined


...


...


 


 


 


 


 


Please, can you help me?


 


Best regards


 


    Emanuele


Paolo Manfrin

Hi Emanuele,


sorry my mistake :-)


 


It's inside the Loader.dll


 


coresuiteFramework.Loader.Module.IModule


 


Please keep in mind that both the starter project and the main project must contain a reference to


SwissAddonFramework.dll


Loader.dll


 


hth


paolo

Emanuele Croci

Thank you very much Paolo.


I followed your suggestions.


Now, I can compile the VS project and now I can register the module into Coresuite.


Module works fine.


 


Best regards


 


   Emanuele


Paolo Manfrin

Hi Emanuele,


glad it did work.


 


Please keep in mind that starting from version 3.40 we will recompile all our addons with .NET Framework 4.0 that means that the addons will need to be recompiled against this version.


 


Cheers


paolo


0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post