Is there a way to restrict who can edit the Drop Ship check box in Sales Order? We are having some issues that some Sales/Customer service personnel are click this box and is creating POs. Would also like a way to track who clicked that check box
Is there a way to restrict who can edit the Drop Ship check box in Sales Order? We are having some issues that some Sales/Customer service personnel are click this box and is creating POs. Would also like a way to track who clicked that check box
if oSession.ASObject(oSession.Security).IsMember("admin") <> 1 then
retval = oScript.SetError("Sorry you are not authorized to edit the Drop Ship check box in Sales Order. Nice try!")
end if
This is a script that was originally used for the Terms Box you can attached it to the Drop Ship check box. In User Maintenance create a Customization Group (that's the "admin" part in the script) called 'admin" or whatever you want and put it in the script. Give it a try. I think Elliott The Boy Wonder came up with this script.
Column Pre-Validate trigger... for that script.
I am a little confused by "Creating a customization group", in User Maintenance I have the Customization Group box, but it is just a text field that holds 4 characters. I copied the script (changed admin to CS) and created a pre-validation on the field and absolutely nothing happens whether i put CS in the customization group or leave it blank.
IsMember checks for a role, not customization group. Create the named role and assign to the user, for that company code.
Can you think of any reason that the SetError doesn't work? I have it as Pre-Validate on the DropShip field. I know that the if-then statement is working correctly because I was able to display a message box. I am stumped.
SetError should work for any "Pre" event. That is odd.
Frustrating, Ok, well I will keep playing with it. Thanks for your help.
For troubleshooting purposes:
* Try this variation of IsMember:
If oSession.IsMember("CS") Then
OR
If oSession.IsMember("CS") > 0 Then
* I haven't checked the max length but try a shorter message such as oScript.SetError("Charlie Brown says Good Grief.")
* Make sure you've gone into Role Maintenance and created the CS role (do not assign any tasks, sec events, etc) then in User Maintenance assign appropriate users to CS role.
*Community Hub is the new name for Sage City