7/7/2025 12:29:49 PM
|
|
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!
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.
|
|
|
|
Calling SLX Script using Application.Basicfunctions.DoInvoke
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 |
|
|
|
Re: Calling SLX Script using Application.Basicfunctions.DoInvoke
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 |
|
|
| |
|
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!
|
|
|
|
|
|
|
|