Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, February 21, 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: Type Mismatch while trying to capture Return Value from .Net Extension
Ram Sundaresan
Posts: 16
 
Type Mismatch while trying to capture Return Value from .Net ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 08 9:12 AM
In my .Net Extension I have declared the Return Value as String (array) as given below (using VB.Net)
Dim ReturnValue(2) as String
ReturnValue(0) = "Error"
ReturnValue(1) = "........."
Return ReturnValue

In the SLX script running the .Net Extension I capture the Return Value as per the code below
Dim arrayRetValue()
arrayRetValue = Application.Managed.Run(ext, args)
I get a Type Mismatch error at the above line arrayRetValue = Application.Managed.Run(ext, args)

If I pass on a simple Return Value string like Return ReturnValue(0) + " : " + ReturnValue(1), declare a simple string like Dim arrayRetValue (not a array like arrayRetValue()) and capture the Return Value I am able to get the Return Value. I am able to work with such a code since I can manipulate the string by looking at the first few characters. But I would like to know where I am going wrong in declaring the array string in SLX. Ideally I would like to capture the Return Value as a (String) Array and look at the first element of the array for the next action.

Ryan had clarified that there is marshalling of the variables in .Net Extensions. Is this something to do with marshalling?

Thanks.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Type Mismatch while trying to capture Return Value from .Net ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jul 08 7:32 AM
Ram,

I do not usually return arrays back from the call but rather a complex type that has properties representing the values I would like to use. If you do return a type you should mark the class as so that you can use it in SalesLogix. You will then call your run method as

dim someobject
set someobject = Application.Managed.Run(ext, args)
if not someobject is nothing then
txtControl.Text = someobject.someproperty
end if
[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/21/2025 11:44:27 PM