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 - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriable
Harry
Posts: 13
 
How do I pass (split Array) strings from VB6 DLL object into GlobalVeriableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jul 10 10:02 PM
Hi,
I have a DLL object call TA_SL_Scripts.dll and it processes a VB function which splits a string and I need to pass the splited (Array) string back to SalesLogix. I am able to pass a single string using GlobalInfo via Saleslogix.ClientObix but I can't pass a Array String for some reason. I am guessing the globalInfo is not meant for Array strings-? (Please see the codes below for more detail.) Any help is very much appreciated!

----Here is the code in DLL
--------------------------------------------
Option Explicit

'Since SLx does not have Split function we'll use VB6 DLL
Public Function SplitString(StringToSplit As String, Argument As String)
Dim oSLx As Object
Dim aSplit() as string

MsgBox (StringToSplit) 'TEST if the string was passed from SL to DLL

aSplit = Split(StringToSplit, Argument) 'Here we just splited our String from SalesLogix
Set oSLx = CreateObject("SalesLogix.ClientObjix")

oSLx.GlobalInfoSet "GBSplitResults", aSplit() 'Store the splited array in SL Global Veriable
Set oSLx = Nothing
End Function
--------------------------------------------


--- Code in SalesLogix --- (Legacy Script)
--------------------------------------------
Dim oTASL as object
Dim SplitResults(10)
Dim MyString() as string


set oTASL=CreateObject("TA_SL_Scripts.VBFunctions") 'Register/load Dllobject
A="abc | Axxcxc" 'TEST string we'll split using the pipe
oTASL.SplitString(A,"|") 'Pass strings to Dll object

GlobalInfoFor "GBSplitResults",MyString 'Retrieve Array Global Veriable, it fails here. But if I retrieve only a single string not array it works fine.

msgbox mystring
End sub
--------------------------------------------


Unless you know a proper way of passing a array string back to SalesLogix via Dll Object even better. I would rather NOT use GlobalVeriable.... I would rather use parameters.

Thank you
H
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jul 10 3:17 PM
Are you using Legacy Scripts in SalesLogix?
SalesLogix ActiveScripts do support the Split function.

Unless you can't get away from it, it may be much easier to use an ActiveScript within SLX to do this.
[Reply][Quote]
Harry
Posts: 13
 
Re: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jul 10 3:46 PM
Well, Thank you for the reply Raul. can You tell me one thing. Is there any reason why anyone would use Legacy Views / Basic etc. We are currently on version 6.2 if we wanted to move over to ActiveScript forms what kind of things do we need to watch out from-? I took over this firm that was all developed under basic all the views / forms everything. So now I am starting to wonder what is the reason behind it-?

Thank you
H
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jul 10 9:56 AM
Legacy, as its name implies, is the old Forms and Scripting that SalesLogix used.

Why use Legacy? Only if you are supporting an Older Implementation with lots of Legacy code and you are making minor changes that would make no sense moving over to Active Forms.
Otherwise, I would at least make sure any new functionality is built on Active Forms, and port any older components if they require extensive changes.
[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:17:52 AM