Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: ClassName ... not found
Jay
Posts: 6
 
ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 12 2:13 PM
fiogf49gjkf0d

Hello everyone,


First of all, Thank you Ryan and everybody else who share their knowledge. This helped me alot learning and understandig SLX. I have tried creating a .Net extension and did everything what Ryan said "Introduction to .NET in SalesLogix Version 7"  but unfortunately I am unable to run the form. I am getting an error:


------------------------------------------------------------------------------------------------------


System.ApplicationException: ClassName 'ClassLibrary1.Class1' Not found.


at Sage.SalesLogix.NetExtensions.RemoteLoader.Create(String ClassName)


at Sage.SalesLogix.NetExtensions.RemoteLoader.Create(String ClassName)


at Sage.SalesLogix.NetExtensions.Loader.Create(String PluginTitle, String ClassName)


------------------------------------------------------------------------------------------------------


We are running Version 7.2


Can someone help me with this? Thank you in advance!


Jay

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 12 7:29 PM
fiogf49gjkf0d

Did you register your DLL on the SalesLogix .NET Extension Manager?


Did you test this with SalesLogix on the Same Machine that you developed your Extension?


 


The fact that it couldn't even Instantiate your class may be an indication that it didn't get registered....

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 12:23 AM
fiogf49gjkf0d

Can you provide some code to look at? Both the .NET code and the VBScript code that launches the extension?

[Reply][Quote]
Jay
Posts: 6
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 1:20 AM
fiogf49gjkf0d

Thank you Raul and Ryan for the fast response.


Well I add the plugin on the .Net Extensions Manager like the tutorial said. It shows up on the dependencies tab. But next to the file name the icon shows the "unknown file type icon", perhaps this has something to do with...


-----------------.NET code----------------------------------------------------


<p>Imports System.Windows.Forms
Imports Sage.SalesLogix.NetExtensions

 


Public Class Class1
    Inherits Sage.SalesLogix.NetExtensions.BaseRunnable


    Public Overrides Function Run(ByVal Args() As Object) As Object
        Dim msg As String = "Hello .Net-SalesLogix World!" & vbCrLf & vbCrLf & _
                            "Argument passed: " & IIf(Args.Length = 0, "None", Args(0)) & vbCrLf & _
                            "Current userid: " & SlxApplication.BasicFunctions.CurrentUserID() & vbCrLf & _
                            "Connection String: " & SlxApplication.ConnectionString


        MsgBox(msg, ".NET MessageBox")
        Return Nothing
    End Function
End Class


-----------------VBScript-----------------------------------------------------


<p>Sub Button1Click(Sender)
    Dim ext
    ext = Application.Managed.Create("ClassLibrary1", "Class1")
    Application.Managed.Run ext, "Hello from Architect"
    Application.Managed.Destroy ext
End Sub

 


Thank you again!

[Reply][Quote]
Jay
Posts: 6
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 1:27 AM
fiogf49gjkf0d

@Raul I forgot to mention... I tested it with SalesLogix on the same machine

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 2:17 AM
fiogf49gjkf0d

Jay:


 


  The Create call takes 2 parameters: a Title and the Class Name.


  The Class Name has to be qualified including your Name Space.


 


  So, based on your code, it should be something like (notice the change I made on the .Create call:



Sub Button1Click(Sender)
    Dim ext
    ext = Application.Managed.Create("My Test Library", "ClassLibrary1.Class1")
    Application.Managed.Run ext, "Hello from Architect"
    Application.Managed.Destroy ext
End Sub

[Reply][Quote]
Jay
Posts: 6
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 3:01 AM
fiogf49gjkf0d

I have tried that but nothing happens, not even the error msg pops up anymore. I guess title and class name are right because the error msg only appears if I enter:


ext = Application.Managed.Create("ClassLibrary1","Class1")
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 3:31 AM
fiogf49gjkf0d

Quote:
Originally posted by Jay


I have tried that but nothing happens, not even the error msg pops up anymore. I guess title and class name are right because the error msg only appears if I enter:


ext = Application.Managed.Create("ClassLibrary1","Class1")


 


No error message means that your code is probably being launched.


After you execute the .Create call, check the value of the ext variable. If it isn't blank, that means that it is finding the .Net Library.


I would simplify the code on the Run Function. Also, I'm not a VB.Net expert, but try using MessageBox.Show as shown by Ryan's example. (although I seem to recall that MsgBox still works on VB.Net).


 


 


 

[Reply][Quote]
Jay
Posts: 6
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 5:24 AM
fiogf49gjkf0d

Wow it finally worked.
I have changed class name back to "ClassLibrary1.Class1" and used MessageBox.Show instead of msgbox.


Thank you Raul!

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: ClassName ... not foundYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 12 10:38 AM
fiogf49gjkf0d

Glad to hear it's working.

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 5:55:31 PM