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

Parents
  • 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.

Reply
  • 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.

Children
  • 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

    I see - so I'll need to wait until the end of the day to check if this will work since others are using the Customer Maintenance task throughout the day. 

  • 0 in reply to neuropathy

    Scripts are loaded fresh each time you start the program.  You don't have to wait.  Users won't see the change until they restart their copy.

  • 0 in reply to Kevin M

    OK that's good to know. Well, I've checked Company Maintenance and found that All External Access was already checked. I'm not sure exactly how to compile the script and get the prompt - last time I added the script, it didn't prompt and I didn't make any changes in Company Maintenance, other than change the SMTP port to use TLS.

  • 0 in reply to neuropathy

    You can manually compile through a button in the lower left of the UDS Maintenance screen.

    Click this and it should show a list of event scripts to recompile.

  • 0 in reply to Kevin M

    Thanks, getting closer, just seems to block everyone (including admin) from making changes to the SalespersonNo field (it seems that SalespersonNo field was correct as well as the table AR Customer Master). I've tried closing Customer Maintenance, applying the role in User Maintenance and reopening Customer Maintenance, but it won't allow me to change SalespersonNo - the "not authorized prompt is working there" but it blocks even if the user has the role that should be able to make this change. When I added the role to the user account, I tried using All Company as well as the specific company this should affect since that's the one that relates to this customer's file.

  • 0 in reply to neuropathy

    The only part I changed in Louie's script was "admin" to "SalesPerson" - I created a role with exactly that name (capital S and P), but that didn't allow me to modify the SalespersonNo when I applied the role to my own account. When I open the SalesPerson role I created in Role Maintenance, I see the role shown as SALESPERSON, so I tried to change the script using all caps and recompile - still not working, unfortunately. I wonder what I'm doing wrong here now. 

    I also tried to allow the SALESPERSON role allow permissions (Create, Modify, View, Remove) in Role Maintenance for AR, Maintenance, Customer Maintenance - I only made this change in the Role Maintenance - Tasks tab. Looking in to the options in ODBC Security tab - looks like this alone could possibly control the SalespersonNo from being modified? I'd never looked in this tab before. Doesn't work either, unfortunately - still can't modify salesperson even when given the role set to do so.

  • +1 in reply to neuropathy
    verified answer

    The IsMember check may be case sensitive.  Match the case in Role Maintenance to what's in your script, and recompile.

    Edit:

    ODBC security is only for external query access, nothing functional.

    Edit 2:

    Change your filter to:

    oSession.ASObject(oSession.Security).IsMember("admin") = 0