Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 36993

Forum Post: UDS: Pre Validate Textbox not firing when value is removed (Bug?)

$
0
0
OK.  I have a UDF in Item Maintenance.  I have the following UDS Script attached to the Column PreValidate: user = oSession.userCode auth = oSession.AsObject(oSession.Security).IsMember("Sales") Select Case auth Case 0 r = oBusObj.SetValue("UDF_SO_Disable_User$", user) 'r = oBusObj.SetValue("UDF_SO_Disable_Date$", NOW) Case 1 r = oScript.SetError("Setup indicates you are not authorized to enable/disable parts. Please contact your Administrator.") End Select The idea here is that users who have the role of "Sales" assigned to them should not be able to change that field.  Users who are NOT in the "sales" group can change the field and it updates two other UDFs with the usercode and the datetime of when the data was changed.  As it stands, this is working correctly. Here is where the bug comes in. USERA Is a member of "Engineering" and is authorized to make changes. USERB Is a member of "Sales" and is NOT authorized to make changes. USERA enters data into the UDF, the script fires and updates the fields and allows the changes. USERB tries to overwrite the data in the UDF, the script fires and it fails giving the message in the script. USERB then just deletes everything in the UDF, the script never fires. I've tried this with multiple UDFs, it appears to be a bug that the UDS doesn't try to validate "blank" data.  :(

Viewing all articles
Browse latest Browse all 36993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>