| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/13/2006 12:03:19 AM | fiogf49gjkf0d Great article Ryan (as if you would produce anything less ;-)). I am looking forward to your future articles and insights on .Net and SalesLogix. Agree with you - it is a great new dawn that is approaching and a good day for SalesLogix developers.
Ted | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/13/2006 12:07:59 AM | fiogf49gjkf0d Thanks Ted! | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/15/2006 2:57:17 AM | fiogf49gjkf0d wauuw, long waited functionality... looking forward to v. 7 :)
thanks ryan!!! | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/15/2006 9:08:26 AM | fiogf49gjkf0d Interesting.. I have a project on the horizon involving recreating existing modification in the network client in the the web client. Will the ablility to work in .net in V7 make the process of maintaining the mods in the network client and the web client any easier? Could common code be called from the network and web client with this ability to work in .net? Thanks | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/15/2006 11:37:18 AM | fiogf49gjkf0d Steve,
Well, the fact that you're writing your code outside of SLX would mean that you could reuse code in other areas, however there is nothing built into the Web Client that allows for any use of .NET assemblies. You would have you build your web customizations in ASP.NET in order to reuse code. So I guess the answer is "yes, but no". Hehe.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/15/2006 2:58:48 PM | fiogf49gjkf0d Ryan can you tell me if I can run your example with VB-NET Express 2005 or if I have to use the full version.
Thank-you
| |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/15/2006 3:00:50 PM | fiogf49gjkf0d Christian,
Yes. It should work fine on Express (although I can't test to tell you for sure since I don't have Express installed anywhere)
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/16/2006 4:33:20 AM | fiogf49gjkf0d Finally we might be able to get some decent source control working with SalesLogix.
Wonder if there are any plans to migrate to a full .NET version, where everything is .NET and available through Visual Studio?
Cheers! | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/16/2006 9:27:15 AM | fiogf49gjkf0d Kevin, version 8 - code named Gila Monster :-D | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/22/2006 3:02:26 PM | fiogf49gjkf0d FYI, this feature will be renamed from ".NET Forms" to ".NET Extensions" in the next release of v7. Yay! | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 5/25/2006 2:59:28 PM | fiogf49gjkf0d Thanks Ryan! You have been a wonderful help over the years.
Norm | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/25/2006 2:10:27 PM | fiogf49gjkf0d Article has been updated for SalesLogix v7 Gold release syntax.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 12/19/2006 12:33:59 AM | fiogf49gjkf0d Great article Ryan ..................
HareRam Yadav | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 1/3/2007 12:04:49 PM | fiogf49gjkf0d I got this to work by changing
' instanciate the .NET Extension ext = Application.Managed.Create("SLX NET Extensions Test", "ClassLibrary1.Class1")
to
' instanciate the .NET Extension ext = Application.Managed.Create("ClassLibrary1", "ClassLibrary1.Class1")
for c#
Thanks again Ryan!
Norm | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/7/2007 9:15:22 AM | fiogf49gjkf0d I've got the below to work, but I can't seem to get it to return a value..preferebly a string. Any ideas?
C#:
public class Class1 : Sage.SalesLogix.NetExtensions.BaseRunnable { public override object Run(object[] Args) { string msg = (Args.Length == 0 ? "None" : Args[0].ToString()); string msg2 = (Args.Length == 0 ? "None" : Args[1].ToString()); MessageBox.Show(msg + "-" + msg2, "Test Message Box");
SLXTransWebSvc.SLXTransWebSvc t = new SLXTransWebSvc.SLXTransWebSvc(); string result = t.LoadStaging("200701");
return result; } }
SLX Code:
Dim ext ' this variable will hold the handle for the loaded .NET Extension Dim args(2) ' instanciate the .NET Extension ext = Application.Managed.Create("SLXTEST", "SLXTEST.Class1") args(0) = "TestParam1" args(1) = "TestParam2" ' run it (and pass any arguments) Application.Managed.Run ext, args
' destroy the loaded .NET Extension Application.Managed.Destroy ext
Thanks! --Preston
| |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/7/2007 12:17:42 PM | fiogf49gjkf0d Hi preston.
I don't see anywhere in your SLX code where you are capturing the return value. Assuming that the line:
string result = t.LoadStaging("200701");
Really is returning a value into "result" (where you later return), you should be able to get that value in SLX by modifying the line:
Application.Managed.Run ext, args
to the following:
myResult = Application.Managed.Run(ext, args)
the variable "myResult" would now contain the return value. Make sense? | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/29/2007 4:10:34 AM | fiogf49gjkf0d Hi Ryan,
I have never developed for SalesLogix before. I mostly do Sage MMS, Line500, Sage1000 development and standalone Win32 apps.
I must say however your 'Tutorial' if I can call it that was amazing. Right to the point, simple enough to follow and detailed enough to get the job done. it allowed me integrate my .NET dll's into SalesLogix perfectly.
Many thanks for sharing your knowledge! Faisal | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/30/2007 10:18:12 AM | fiogf49gjkf0d Ryan,
Thanks for this article! It's very informative, and easy to understand... But I would like to ask you a related question. If you are familiar with MAS500.... I've been told that the Business Insights Analyzer is just .NET control that runs off of a Sequel view.... Do you, or does anyone else know what I would need to include or do to reference the BIA in the SalesLogix .NET extension manager, in order to run the BIA from within SalesLogix, on a workstation where the MAS500 Desktop is installed?
Thanks. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/30/2007 10:31:35 AM | fiogf49gjkf0d Hi Craig,
I do know that the BIA is comprised of .NET and SQL views, but I don't know more about it than that. I've never used it or anything. Taking SLX out of the picture, how would you use it normally? Is it just a .NET assembly that you would add a reference to normally? If that is the case you'd just reference it by your .NET Extension and it would get pulled in as a reference by the .NET Extension Manager (so you're not exactly adding the BIA to the .NET Extension manager, you're adding it to your own .NET project - it is your .NET project that uses the BIA that gets added to the .NET Extension manager)
Hope this helps.
-Ryan
Hope this helps. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/30/2007 11:10:03 AM | fiogf49gjkf0d Thanks Ryan,
I hear what you are saying. I just thought that perhaps there was a way to do it directly via the DNEM. I will look for some help on coding the assembly to call it. Any suggestions on where to look?
TIA. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/25/2007 10:11:28 AM | fiogf49gjkf0d Hi Ryan,
I'm very interested in using .NET extensions in our next project. I've used the same code but my call:
guid = Application.Managed.Create("SLXinterfacesAdapter","SLXinterfacesAdapter.PAIS")
... returns blank. I've quadruple checked my set up in the .NET extentions manager and it appears right and has a guid value. Also the "title" and "class" parameters are definitely entered accurately in the .Create() call. Any suggestions why it's failing to find my class?
Thanks! -- Matt | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/25/2007 12:17:22 PM | fiogf49gjkf0d Hi Matt,
If the returned value from Application.Managed.Create is blank that would most likely mean one of two things:
1) The "Namespace.Classname" for the assembly or the "Title" as defined in the .NET Extentions manager do not match with the code you're using to invoke it. Double check that.
2) The .NET Extention files did not get properly registered on the machine you're testing on. If this is the case, you can fix this by manually running the batch file named "RegisterSLXNetExtentions.bat" found in the SalesLogix directory.
Give those a try.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/25/2007 3:04:57 PM | fiogf49gjkf0d Thanks Ryan!
Suggestion #2 was magic. I'm off and running into my own set of bugs. Thanks again. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 8/6/2007 8:45:59 AM | fiogf49gjkf0d Awesome article, but I am having a problem with the .NET Extension manager crashing. When I open it, it crashes and the error report says there is an uncaught System.IO.DirectoryNotFound exception. Do you have any ideas? | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 1/2/2008 8:06:43 AM | fiogf49gjkf0d Can we use Visual Studio 2005 to debug and/or trace the Class/DLL, the same way as we do with other Class/DLL? | |
|
| |
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 4/8/2008 3:52:47 AM | fiogf49gjkf0d hi Ryan I have a problem,please give me a hand .
try { string constr= "Provider=SLXOLEDB.1;Password=\"anyuecrm\";Persist Security Info=True;User ID=admin;Initial Catalog=anyue4-1;Data Source=ck2602;Extended Properties=\"PORT=1706;LOG=ON;CASEINSENSITIVEFIND=ON;AUTOINCBATCHSIZE=1;SVRCERT=;\"";
System.Data.OleDb.OleDbConnection o_con = new OleDbConnection(constr); o_con.Open(); } catch(Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message.ToString()); }
The error of connection. Error: "There is not available information that is incorrect:E_UNEXPECTED( 0x8000FFF) | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 4/8/2008 10:52:11 AM | fiogf49gjkf0d Try replacing : System.Data.OleDb.OleDbConnection o_con = new OleDbConnection(constr);
with System.Data.OleDb.OleDbConnection o_con = new System.Data.OleDb.OleDbConnection(constr);
| |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/4/2008 12:48:55 PM | fiogf49gjkf0d I'm wondering how exactly the .NET extensions deploy out to the client. Do the dll's have to reside physically on each remote computer for them to work correctly in the client, or can they simply be invoked from the server? We have some extensions that are working correctly for some users, but not working at all for others, and we can't seem to isolate the problem to the existence of the extension dll files on individual workstations.
Being new to the SalesLogix environment, I'm a little confused on exactly how these extensions are deployed.
Thanks! Jason Lindsay Unison, Inc. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/26/2008 6:31:22 PM | fiogf49gjkf0d Ryan,
Do you know if you can use the 3.5 framework in an extension? Obviously it would be required to be installed on the users machines, but the 3.5 framework really is just the 2.0 with extensions added, so I would think that the "Sage.SalesLogix.NetExtensions.Framework.dll" would fit into a VS 2008/3.5 project fine. I don't expect you to do my legwork and try it, but I was curious if you have.
Thanks,
Jeff
| |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 6/26/2008 6:36:05 PM | fiogf49gjkf0d Hi Jeff,
Yes, you can use .NET 3.5 as an extension. Works fine.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/22/2008 10:06:53 AM | fiogf49gjkf0d Great article, but I'm having trouble with this example on our Saleslogix system (7.2.0.1501)
I have followed the steps in this article closely, including the suggestions in the comments, but I am getting the following error when instantiating the extension from the Saleslogix button event:
Script Error An error occurred executing active form script (System:HelloWorld) Error calling method btnHelloClick
Unsupported provider version
at line 12, char 5
This seems to be at the Application.Managed.Create call. The full script (with line numbers) is:
1 2 3 option explicit 4 5 dim ext ' this variable will hold the handle for the loaded .NET Extension 6 7 Sub btnHelloClick(Sender) 8 ext = "" 9 10 msgbox "Application.Managed.Create(""HelloWorld"", ""ClassLibrary1.Class1"")" 11 ' instantiate the .NET Extension 12 ext = Application.Managed.Create("HelloWorld", "ClassLibrary1.Class1") 13 msgbox "ext=" & ext 14 ' ext = Application.Managed.Create("", "") 15 16 ' run it (and pass any arguments) 17 Application.Managed.Run ext, "Hello from Architect" 18 19 End Sub 20 21 22 Sub AXFormClose(Sender) 23 if ext <> "" then 24 ' destroy the loaded .NET Extension 25 Application.Managed.Destroy ext 26 end if 27 End Sub
The msgbox call at line 13 is never reached. I created the class library with Visual Basic 2005 Express. There is no mention of what provider or version is involved.
Any suggestions would be greatly appreciated.
Simon | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/22/2008 10:58:22 AM | fiogf49gjkf0d Hello Simon,
Are you sure your .NET Extension title is "HelloWorld"? It seems strange that this would be your title when your fully-qualified classname is "ClassLibrary1.Class1". That seems to be the most logical thing that could be causing the problem.
However, the error "Unsupported provider version" is quite odd and doesn't really match that. Can you check that the version of SLX that the extension was created with is the same as what you're using it on? Meaning the versions of "Sage.SalesLogix.NetExtensions.Core.dll" and "Sage.SalesLogix.NetExtensions.Framework.dll" used in your .NET project *match exactly* with the version of SLX you're using the extension on.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/25/2008 8:11:00 AM | fiogf49gjkf0d Hi Ryan,
Thanks for the reply. I should say that I'm new to .NET and SLX (my background is Java and VC++).
"HelloWorld" is the title shown in the .NET extensions manager (it's the Assemby Name and Title I gave it in the VB project properties). I also checked the "Make assembly COM-Visible" option. From the previous comments, if this is not correct then the Application.Managed.Create would not return a value. Instead I get the "unsupported provider version" error.
I've checked the NetExtensions DLLs in C:\Program Files\SalesLogix directory: Assembly version=7.2.0.1501 for both. I had copied the Sage.SalesLogix.NetExtensions.Framework.dll from here to include in the VB project so the assembly version is identical. Do I need Sage.SalesLogix.NetExtensions.Core.dll as well? Is SalesLogix picking up a DLL with a different assembly version from somewhere? Is there a .NET dependency on some other assembly?
Simon | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/25/2008 9:19:42 AM | fiogf49gjkf0d Simon, what version of SLX are you on? | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/25/2008 9:25:42 AM | fiogf49gjkf0d Ryan,
Sorry, should have mentioned, SLX client shows version 7.2.0.1501, same as the DLL assembly versions. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/30/2008 6:04:10 AM | fiogf49gjkf0d Update:
I've tried building the .NET class library using Visual C# 2005 Express. Still get the 'unsupported provider version' error. Thought this might be because I'm using the 'Express' version.
Now it gets really strange. I removed all the .NET extensions in the .NET extensions manager, then retried the form from the SLX client. I thought I would get some other error, but I'm still getting THE SAME ONE: 'unsupported provider version'.
I'm totally confused. Any ideas? | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 9/30/2008 10:03:33 AM | fiogf49gjkf0d Hello Simon,
By chance, is this on a 64-bit machine? BTW, we should probably move this to the forums.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 10/7/2008 3:23:08 AM | fiogf49gjkf0d Ryan, I think it's 32 bit but I'm not 100% sure. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 12/2/2008 3:35:47 PM | fiogf49gjkf0d Instead of calling the command Application.Managed.Destroy ext to destroy the loaded .Net extension is there a way to have the .net extension destroy itself on a particular event in the extension?
For instance say i have a phone dialer that is called on a click event in an account form. It then monitors the call for various stats like time it took to ring, busy signal, duration of call. On a disconnect event I write to a table all the pertinent details and would like to destroy the .net extension. If i call destroy in Architect after run the extension no longer monitors all the events. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 3/18/2009 4:02:25 PM | fiogf49gjkf0d If you get an error "invalid class string" returned from the client on a particular machine but the .net extention works on other machines. Run the batch file RegisterSLXNetExtentions.bat on the affected machine to fix it (located in Saleslogix directory) . I got this right from SLX SDK support worked great! | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 11/6/2009 5:34:22 PM | fiogf49gjkf0d hi all i am working with saleslogix 7.5. i create the exact test in vb2005 and runned directy on the slx server and it work perfect, tested on another computer in the same network and i get this error that assembly does not allow partially trusted callers at slxobj.slxmain..ctor() the action that failed was linkdemand the assembly or appdomain htat failed was: slxob version 1.0.0 the zone of the assembly htat failed wad: intranet the url . . . .
if any one has any idea i will really thank them its an emergency
all the code work on develop computer and server but on production only work directly on the main slx server | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 1/10/2010 9:13:05 AM | fiogf49gjkf0d This doesn't work in 7.22 as is....any ideas on what I need to change? I click on the button in SLX Client, I guess nothing executes on the .NET side (although msgbox's on the SLX side are working fine). | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 1/10/2010 10:42:03 AM | fiogf49gjkf0d RJ,
Could it be that .NET Extensions didn't get properly registered on the machine you're on? Have you tried running the RegisterSLXNetExtentions.bat file to ensure things are registered? Try that, these should work on 7.2.
-Ryan | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 11/18/2011 10:17:19 AM | fiogf49gjkf0d Hi Ryan,
Fantastic example, so many thanks for that.
Got your above example working on a 7.5.3 32 bit environment but cannot for the life of me get it working on a 64 bit server..I've run RegisterSLXNetExtentions.bat manually but still no joy. No errors are reported it just doesn't appear to call the .Net dll.
Have you had any experience with the above on 64 bit machines ?
many thanks. | |
|
| Re: Introduction to .NET in SalesLogix Version 7 Posted: 12/8/2014 2:50:40 PM | fiogf49gjkf0d Hi Ryan,
I am new to Slx development. As a long time .net developer this article clicked with me well; I was excited to have someone like you leading the way to leverage .net in SalesLogix coding world. This article was well written and instruction easy to follow. But somehow, it did not work on SalesLogix client side when I added the extension and tried to call the CreateObject. I am running on a 64-bit machine and I saw someone posted the same question about not working on a 64-bit machine. Was that true? What is the way out of this? My SalesLogix client is at version 7.5.2.2151.
I know it has been a while you wrote this piece, but I am desperately in need for some guidance so I am hitting every path I can find.
Thanks so much!
| |
|