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: Validation error on order submit...
Chris Donaldson
Posts: 30
 
Validation error on order submit...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 May 07 10:29 AM
fiogf49gjkf0d
We are using the CSC salesorder module and I am adding some functionality...btw, we are using 5.2.4.

I assign a sqlstring = "Select count(UserName) As CountUser from sysdba.userinfo where department like '%Name%' and UserID = '" & CurrentUserID & "'".

I have validation statements to verify that certain data at the account and contact levels are there before allowing the order to be submitted. What happens is that because of the As CountUser above, it throws this as a field requiring data in the validation statements and won't ignore it. Can someone think of a better way of handling this, or has it been seen before? Any help will be greatly appreciated.

Thanks in advance...

ChrisD
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Validation error on order submit...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 07 4:22 AM
fiogf49gjkf0d
I suspect that your problem is actually your SQL statement erroring and not being picked up. This might be causing your validation to fail. Drop the word AS from your statement.

Try:

Select count(UserName) CountUser from userinfo where department like '%Name%' and UserID = '" & CurrentUserID & "'"

Also - I dropped the sysdba reference as it is redundent.

Hope that helps!

ws
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation error on order submit...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 07 4:56 PM
fiogf49gjkf0d
Also, it's pointless to have both conditions in your query for department *and* userid. If you're filtering on a specific userid, makes no sense to also use department (since using a specific userid will get you a single record match)
[Reply][Quote]
Chris Donaldson
Posts: 30
 
Re: Validation error on order submit...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 07 10:20 AM
Maybe you need more information.

The reason for both conditions is that I am trying to apply some code to particular users without actually putting their userid's in the code. Thought it would be easier to add an identifier to the department field and apply the code via that method. Also, I am doing a count to determine if there is more than 1 and that is my trigger for the code, just in case there is more than one person that this needs to apply to.

After trying what Walter mentioned, I am still getting a SalesLogix.exe error. There is nothing being captured in my error capturing. Not sure what may be causing this. The results of the query are returning correctly so that seems to be working, it just isn't doing what I want it to.

Maybe I just need to present my challenge and see if I can get some help. I am trying to create a new saleorder status which when an order is submitted only allows those identified above to actually submit. Anyone else who submits an order with a particular payment term will have it go into this new status and when one of the other users identified by the query tries to submit, it will actually go into the real status that will take it over into our MAS500 db...

Hope that makes some sense...

Thanks in advance...

cd
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Validation error on order submit...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 May 07 4:58 AM
This sounds like your code should be more along these lines

Select department from userinfo where UserID = '" & CurrentUserID & "'"
If department <> "authorized department" then
msgbox "sorry, you are not authorized to do this"
exit sub
end if

ws
[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 6:27:24 AM