Sage 100 2013 Restrict ability (permission, right, role) to change Salesperson in Customer Maintenance, Sales Order Entry, etc

SOLVED

Hi everyone, 

I'm using Sage 100 ERP 2013

Does anyone know exactly where (and if, even) I can limit users' abilities to change the Salesperson in Customer Maintenance, Sales Order Entry, and anywhere else where it's possible for them to do so? I'm having a lot of problems with people doing this at my family's small company. I hope I don't have to customize the panels in order to achieve this - that can't be, right? I looked, but had trouble finding what I needed.

Hopefully someone can give me a clear path to the exact right in Role Maintenance that will switch this on/off, if it's even possible to do this way. 

It looks like this is as far as it goes: 

I want to be able to control functions within the Customer Maintenance task (and others) but it seems that's as far as things go here.

Hopefully someone has a better solution than being forced to customize another panel. Is there a simply way to add a custom rule to Role Maintenance?

Thank you

  • 0

    When I have to control a field, I set up a column pre-validate script with an IsMember check, then SetError when I want to block changes.  Permissions are controlled not by Role check-boxes, but by whether the user has your new custom role.

    retVal = oSession.AsObject(oSession.Security).IsMember("rolename")

    Will return a value > 0 if user belongs to specified security role or 0 if not a member.

  • 0

    Here is a script that was distributed by the renown Elliot at the Sage Summit.  Only members that are members of customization group Admin can change the credit limit.  You can adapt to any field 

    if oSession.ASObject(oSession.Security).IsMember("admin") <> 1 then
    retval = oScript.SetError("Sorry you are not authorized to change the credit limit. Nice try!")
    end if

  • 0 in reply to BigLouie

    Thanks guys, I just can't see where the variable is for credit limit in that example, if it's there at all - it seems like it isn't and I don't know the syntax or object names to be able to adapt this script.

    Or maybe this needs to be added to the salesperson object somehow so it wouldn't need anything else added to it - I've never used scripts in Sage. I'm not sure where I'd begin with this. 

  • 0 in reply to neuropathy

    The script BigLouie gave is not coded to any specific field, which is very flexible.  You would associate it with a table / field, when you add the event trigger.

  • 0 in reply to Kevin M

    I copied/pasted to script Louie shared into a new script I added in UDS Maintenance - I only changed the role from "admin" to a new role so I can can apply this role to people who shouldn't have the admin role, but need this function. I didn't add any rights in this role - hopefully it'll still work... 

    I entered UDF and Table Maintenance and went into AR Customer Master (is this the correct Table?)

    I set Event to "Column - Pre-Validate" as shown in Kevin's example (is this correct for my purposes as well?)

    I selected SalespersonNo in Field (is this correct for my purposes? Do I need to do this entire process for all of the other Salesperson fields that are listed?)

    I selected the script I added earlier in UDS Maintenance (I'm hoping at least that part is correct)

    Anything needed for Priority? Default is 500. 

    I'm hoping this works and doesn't explode and catch fire or dud either.

    I simply clicked OK after doing all of this in the window below. 

    I have an admin account and although I didn't apply the new role I created (SalesPerson) to myself, I was still able to change the Salesperson in Customer Maintenance. I'll test with another account that has less rights.

  • 0 in reply to neuropathy

    Didn't work - still let me change Salesperson with a user account that shouldn't have that ability. Can someone check that I used all the right Table, Field and Event settings? Do I need to create additional scripts through this same process but modified in various ways to get this to work?

  • 0 in reply to neuropathy

    Company Maintenance - Allow External Access.

    Compile the script (there is a prompt after you add the script event, and close the screen).

    Restart your Customer Maintenance screen after compiling.

  • 0 in reply to neuropathy

    In User Maintenance you need to enter Admin in Customization Group field.

  • 0 in reply to Kevin M

    It is reading Admin from Customization Group in User Maintenance. 

  • 0 in reply to BigLouie

    Sorry BigLouie.  Customization Group only applies to panel customizations in Customizer (instead of All or user specific panels). 

    The IsMember function looks for a named role applied through User Maintenance.