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!
|
|
cannot open .net form with different username
Posted: 23 Jan 08 5:29 AM
|
Hi, I am able to open the .Net extension from sales logix client only when i login the client as 'admin', and when login the client as any other username, i am not able to open the .Net extension and i am getting below exception:
System.invalidCastException:Unable to cast object of type 'System.DBNULL' to type 'System.String' at Sage.SalesLogix.NetExtensions.Loader.Initialize(Object SlxApplication)
Please provide your valuable suggestions asap to make the .Net extension compatible for all the users instead of limiting it to just 'admin'.
Thanks, |
|
|
|
Re: cannot open .net form with different username
Posted: 23 Jan 08 7:56 AM
|
Sam,
I would look into your initialize code in your .net extension. It looks as if some code is being executed in there andyou are trying to do a cast to a string. Specifically looking that you are hitting the database and either using a datatable, dataset and retrieving a value. Look to see if that is happening. IMHO initialize should be used for just setting up some member variables and use the run method for doing the actual work.
Mark |
|
|
| |
|
Re: cannot open .net form with different username
Posted: 24 Jan 08 5:36 AM
|
Hi, Thanks for your valuable suggestions. I have tried to debug the .Net extension by attaching the SalesLogix process as you suggested. And i am able to debug the .Net extension when i login as ADMIN, but when i login as other user, i am not able to debug the .Net extension, the error is getting generated before the debug starts in the .Net extension.
here is the code that i used in the .Net extension.
Public Class frmTest Implements Sage.SalesLogix.NetExtensions.IRunnable Public Shared _SlxApplication As SalesLogix.ISlxApplication
Public Sub Initialize(ByVal SlxApplication As Sage.SalesLogix.NetExtensions.SalesLogix.ISlxApplication, ByVal LicenseKeyManager As Sage.SalesLogix.NetExtensions.Licensing.ILicenseKeyManager) Implements Sage.SalesLogix.NetExtensions.IRunnable.Initialize _SlxApplication = SlxApplication End Sub
Public Function Run(ByVal Args() As Object) As Object Implements Sage.SalesLogix.NetExtensions.IRunnable.Run Me.ShowDialog()
Return Nothing End Function
Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load . . . . End Sub
Here in the above code, the frmTest_Load method performs some fundtionality and retrieves the data from database.
The above code works fine when i login as ADMIN and also able to debug the .Net extension and the cursor comes to the 'Intitialize' method in the .Net form initially, but the same code doesn't work when i login as other user and not able to debug the .Net extension and throws the error directly without moving the cursor to the .Net form. It returns the same error that i have posted yesterday.
Please suggest any solution to make the .Net extension work for any user.
Thanks in advance.
|
|
|
|
Re: cannot open .net form with different username
Posted: 24 Jan 08 6:44 AM
|
is the .net extension released to all of the users, if so are you testing on the same machine. Same windows NT login. There is nothing in the initialize that would be causing the specific issue. In the saleslogix plugin that is calling the .net extension, is the guid value comming back as a valid string.... I would put a stop into the SalesLogix script before the Application.Managed.Create ... method and makes sure that you have a pointer to the extension.
Mark |
|
|
|
Re: cannot open .net form with different username
Posted: 24 Jan 08 8:25 AM
|
My initial thoughts are the same as Marks. 1) Make sure you've released the extension to everyone in the extension manager 2) Check to see if you're getting back a vald guid when you load the extension in the script.
-Ryan |
|
|
|
Re: cannot open .net form with different username
Posted: 24 Jan 08 11:55 PM
|
I have put the stop in the SalesLogix script before the "Application.Managed.Create" statement to debug, but when the cursor comes to the "Application.Managed.Create" statement, the above mentioned exception has got fired without moving to the next statement, hence could not able to check for the Guid value.
-Sam |
|
|
| |
|
Re: cannot open .net form with different username
Posted: 25 Jan 08 12:25 AM
|
Yes, i have released the extension to all the users by selecting the "System" and tried, and also released individual user by Selecting the user from the list of users, but the problem is same. |
|
|
|
Re: cannot open .net form with different username
Posted: 30 Jan 08 6:52 AM
|
Hey Sam,
Looking at the initialize code there are 3 fields that are retrieved from the NETFORMS_PLUGIN table (EntryPointID, FileName, and Title) could you look at the SalesLogix database table and see if any of the data is missing in these fields.
Mark |
|
|
|