Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, May 8, 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!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: Functions in 6.2.6 Web Actions
JJE
Posts: 20
 
Functions in 6.2.6 Web ActionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 3:00 PM
Hello,

I'm trying to create a recursive function in Web Actions

I call it passing the same accountid in both arguments.
The purpose is to parse the parent tree to see if one is Supported and the send back the ID.

Function ParentMaintained(sAccountID, sIDs)
Dim sParentID as String
Dim sID as String
Dim SQL as String
Dim sTemp as String

sID = sAccountID

SQL = "SELECT ac.accountid FROM account ac INNER JOIN accountsummary ay ON ac.accountid=ay.parentid "
SQL = SQL + "WHERE ay.accountid = '" & sAccountID & "'"

sParentID = "" + DoSQL(SQL, "0", "")

If sParentID <> "" And InStr(1, sIDs, sParentID) = 0 Then
If Account_IsMaintained(sParentID)="T" Then
sID = sParentID
Else
sTemp = sIDs + "-" + sParentID
'sID = ParentMaintained(sParentID, sTemp)
If sID = sParentID Then sID = sAccountID
End If
End If

ParentMaintained = sID
End Function

The problem is that when I'm activation the recursive call (the sID=ParentMaintained() line I get an error and can't find what is wrong.

Does someone have an idea?
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Functions in 6.2.6 Web ActionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 3:21 PM
What's the error in the event viewer say? Have you tried a "senderror" statement with your built SQL statement, and if so, does it run OK in QA?

Jeff


[Reply][Quote]
JJE
Posts: 20
 
Re: Functions in 6.2.6 Web ActionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 3:27 PM
I've tested my SQL in Administrator and it works well.
I also have tested the same functionality in the Sales Client without problem.

[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Functions in 6.2.6 Web ActionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 4:32 PM
And there's nothing indicating an error in the event log on the web server (assuming you have event logging selected in the profile/server configuration in web manager)?

You could try putting a loop counter that appends some text with the iteration number in the function and then use "SendError" to output the text. It might give you an idea of how many times it's calling your recursive function - you'd at least know that it's getting into your recursive function and how many iterations it's going through.

Jeff
[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): 5/8/2024 3:52:36 PM