Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 16, 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: Trouble with the 'updateopp' action
Kent Matthew
Posts: 33
 
Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 12:15 PM
fiogf49gjkf0d
Does anyone have any idea why I would be having trouble executing my 'updateopp' action from my 'oppinfo' template? The template and the action are both activated.

The template includes the reference to the action as follows:
<form name="mainform" method="POST" action="<#SYS name=swcpath>/action?name=updateopp&id=<#AF name=id>&oppid=<#AF name=id>" ID="Form1">

However, when I click the "Save" button, it takes an inordinately long time to complete the task, and the updates are not made in the database. I've written a SQL Server trigger which executes when the OPPORTUNITY table is updated, and even though it works, I've commented out everything except the variable declarations in order to rule out any problems which could be caused by the trigger.

I've put a MsgBox statement into the 'updateopp' action, saved the action, and done an IISRESET, but I never see the MsgBox display, which makes me think that the action is not being called. When I change the template to point to an action that doesn't exist, it displays an error message, which is to be expected. When I change the template to point to a very simple action which only includes a MsgBox statement, I again don't see any MsgBox display.

Does anyone have any ideas? Is everyone able to successfully display a MsgBox from the updateopp action except me?
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 12:45 PM
fiogf49gjkf0d
You can not msgbox within code that is executed server side (all Web Client Actions). Debugging the web actions is atrocious as you are limited to using Print to dump messages into the event log.

To truly test if your trigger is the issue I recommend dropping it altogether and then rebooting your web server. Once you make the beast angry I find you can save some hair loss if you just reboot .

Timmus
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 3:55 PM
fiogf49gjkf0d
One update to Timmus' suggestion.

The print statement is broken in 6.2.3; you have to use the "senderror" statement. The syntax is

senderror stringvalue

Doing

senderror "error message"

will print an event in the event log with the text "error message". I always try to put something unique (for me, usually my name) that you can search on to find the event in question a little faster. You can print out variable values, etc., by building them in your string.

Jeff
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 4:00 PM
fiogf49gjkf0d
Jeff,

I thought SendError sends an error page back to the browser. Am I mixing up my sweet SLX Web debugging tools?

Timmus
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 4:01 PM
fiogf49gjkf0d
Jeff,

I thought SendError sends an error page back to the browser. Am I mixing up my sweet SLX Web debugging tools?

Timmus
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 4:02 PM
fiogf49gjkf0d
I guess double posting is ONE way to stay in the top 10. DOH!



Timmus
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 4:08 PM
fiogf49gjkf0d
Timmus,

It does send an error page back to the browswer, but only if you follow it with an "exit sub".

Now, I'm not sure what would happen if you have "sub main" that calls "sub whatever" and the senderror and exit sub happens in "sub whatever". Does control go back to sub main and it keeps running, or does it totally bail and send the error page to the client? Who knows...I haven't had to do a lot of work using the slx tools lately.

Either way, though, you can use senderror without an exit sub and it'll print to the event viewer the way print used to before it broke in 6.2.3.

Jeff
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Aug 06 4:13 PM
fiogf49gjkf0d
Cool. I had no idea the magic was in the "exit sub". As always, SalesLogix Web keeps us guessing

Thanks for the info, Jeff.

Timmus
[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 2:53 PM
fiogf49gjkf0d
Thanks, Jeff and Timmus. With your good suggestion, I can now debug the updateopp action using the 'SendError' statement. What I'm seeing is all statements in the addhist subroutine executing, but no history record ever being written to the database. How could that be? The opportunity table is updated appropriately, so I wonder why I can't add a record to the history table.
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Trouble with the 'updateopp' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 3:01 PM
fiogf49gjkf0d
Since you're not seeing the history in the database, I don't know if it'll help, but try running the SLXProfiler.exe (should be in c:\program files\saleslogix) and trace the web process. (Note if you're running on 6.2.3, slxprofiler does *not* work through remote desktop, it must be run directly on the server.) You might see that there's some sort of SQL problem, or sectabledefs or resynctabledefs issue. It's a stretch, I know, but it *is* the slx web client.

Do you have all the required fields for the history table?

Perhaps if you post the code, someone might spot something.

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): 6/16/2024 1:56:35 PM