Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 2025 
 
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: cannot open .net form with different username
Sam
Posts: 16
 
cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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,
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jan 08 10:44 AM
In addition to what Mark suggested, try debugging the extension to see where the invalid cast is occurring (See http://saleslogixblog.com/rfarley/archive/2007/08/20/37982.aspx for how to debug the extension).

As ADMIN, your queries are different because they have no security added on. It could be that the Admin user has visibility to a record you might be looking for that other users cannot see (hence the NULL value).

-Ryan
[Reply][Quote]
Sam
Posts: 16
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.

[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Sam
Posts: 16
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jan 08 11:59 PM
Were you able to verify that the extension is released to all users?
[Reply][Quote]
Sam
Posts: 16
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: cannot open .net form with different usernameYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[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 © 2025 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): 2/22/2025 9:24:16 AM