Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, July 7, 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 Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Calling SLX Script using Application.Basicfunctions.DoInvoke
Chris Fleetwood
Posts: 35
 
Calling SLX Script using Application.Basicfunctions.DoInvokeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Aug 10 11:02 PM
Hello All,

I am currently experiencing a problem running a SLX script from (VB).NET 2.0. An example of the code is below:

--------------------------------------------------------------------------------------------------------------------------------------

Dim Batch As SlxApplication = New SlxApplication

Select Case ProcType.ToUpper
Case "WEB-ENROLL"
SLXScriptName = "Enrollment Extras:GK Web Enrollments Batch Process"
Case "WEB-VERIFY"
SLXScriptName = "Enrollment Extras:Verify GK Web Enrollments Batch"
Case "IMP-ENROLL"
SLXScriptName = "Enrollment Extras:GK Registrations Import Process"
Case "IMP-CANCEL"
SLXScriptName = "Enrollment Extras:GK Registrations Import Cancel Process"
Case "IMP-VERIFY"
SLXScriptName = "Enrollment Extras:Verify GK Import Enrollments Batch"
Case Else
SLXScriptName = ""
End Select
If SLXScriptName <> "" Then
Batch.BasicFunctions.DoInvoke("ActiveScript", SLXScriptName)
Else
Batch.BasicFunctions.DoInvoke("ActiveScript", "Enrollment Extras:GK Registrations Import Process")
End If

Batch = nothing

--------------------------------------------------------------------------------------------------------------------------------------

This code works fine in production and it did work in my testing environment until recently. When I step through the code in DEBUG, the DoInvoke statement is executed and after a couple of seconds, the process cursor moves to the next line as if the line is being ignored.

My first thought was that somehow, the .NET script did not see the script plugin. So I re-released the plugin in Architect; this has worked for me in the past when I was troubleshooting some code using DoInvoke (and in that case, the wrong script plugin got invoked even the parameter passed was for the intended plugin).

Does anyone have any ideas why this might be happening? This same script works as expected in production and, until recently, was working in my DEV instance. Is there some quirk in Saleslogix that could make a DoInvoke call get skipped or ignored, even though the ActiveScript being called does exist and is being stated correctly?

Any and all insights will, of course, be greatly appreciated.

Thanks in advance,

Chris
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Calling SLX Script using Application.Basicfunctions.DoInvokeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 10 11:45 AM
1. This is VB Script, not .NET script.


2. When I've used DoInvoke I've always called the Sub Main subroutine for that script and you MUST include the family in the call:

Application.BasicFunctions.DoInvoke "ActiveScript", "System:GK Registrations Import Process")

If GK Registrations Import Process is the actual plugin name for the script and you've saved it to the System family.

3. Those individual scripts can have included scripts on the script, or its own subroutines\functions.....but the script that is always do invoked is Sub Main.

4. Make sure the individual plugin scripts are all released to the users.....number 1 reason why a script or form can't be found, even though it does 'exist'.

5. Number 2 reason is that you DoInvoke a function or subroutine on another script and the name of the default routine is not MAIN.

Plugin Family (the Picklist value): Enrollment Extras
Plugin Name: GK Registrations Import Process

Option Explicit

Sub Main
' GK Registrations Import Process routine is here!

End Sub
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Calling SLX Script using Application.Basicfunctions.DoInvokeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 10 12:41 PM
Since the invoked scripts are running as the user that the SLX client is logged in as, is it possible that these scripts aren't released to the user?
[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): 7/7/2025 12:53:01 PM