2026-11-27

Sage 100: Restrict Ability to Change Salesperson in Customer Maintenance, Sales Order Entry, Etc.

There is no Role Maintenance right that stops users changing the Salesperson in Sage 100 Customer Maintenance or Sales Order Entry — but a short User-Defined Script does. Here is the tested setup.

The problem is as old as commissions: salespeople quietly reassigning customer accounts to themselves in Customer Maintenance, and the salesperson field on sales orders drifting with them. You go to Role Maintenance looking for the right that controls it — and it is not there. Sage 100 roles control whole tasks and functions; there is no field-level right for "may change Salesperson," in Customer Maintenance or anywhere else.

The control that works is a short User-Defined Script, validated in the thread where this was first worked out and confirmed successful by the person who asked. It checks the user's role every time someone tries to change the field, and blocks everyone who is not on the approved list.

The fix

  1. Create a dedicated role. In Role Maintenance, create a role named salesperson — all lowercase, deliberately, to sidestep any case-sensitivity question. You do not need to grant this role any permissions: the script only tests membership, and the confirmed setup works with every permission removed from the role.
  2. Assign the role to the people who ARE allowed to set or change salesperson data — supervisors, admins, whoever you trust with it — in User Maintenance. Everyone without the role will be blocked. This is an allow-list, not a block-list.
  3. Enable external access. In Company Maintenance, confirm Allow External Access is checked. User-Defined Scripts do not run without it.
  4. Add the script in User-Defined Script (UDS) Maintenance. The whole script is:

    if oSession.ASObject(oSession.Security).IsMember("salesperson") = 0 then
    retval = oScript.SetError("Please contact a supervisor to set or modify salesperson data")
    end if
    

    In plain terms: if the current user is not a member of the salesperson role, reject the change with that message. The script is not tied to any field by itself — the next step does that, which is what makes the same script reusable.

  5. Compile the script. Accept the compile prompt when it appears after adding the script event; if no prompt appears, use the compile button at the lower left of the UDS Maintenance screen.

  6. Attach the script to the field. In User-Defined Field and Table Maintenance, select the table AR Customer Master, set the event to Column - Pre-Validate, set the field to SalespersonNo, and select your script. Leave Priority at its default of 500.
  7. Repeat step 6 for every other place the field can be changed — Sales Order Entry's salesperson field and any other table that carries one. Coverage is per table and field: attach the event everywhere the change is possible, or the gap you leave is the route people will use.
  8. Test both ways, with fresh task sessions. Scripts load when a task starts, so close and reopen Customer Maintenance before testing. A user with the salesperson role should change the field normally; a user without it should get the supervisor message. The original poster tested exactly this way — their own role-holding account passed, another account was blocked — and confirmed it worked.

Options and approaches

Script (allow-list) vs. inverted script (block-list)

The setup above blocks everyone except role members. A later, equally confirmed use of the same pattern inverts it: the script blocks users who ARE members of a named group (IsMember(...) = 1 then SetError), restricting a specific team — there, sales staff changing the salesperson on a ship-to address in Sage 100c Advanced 2017 — while leaving everyone else alone. Choose by shape: allow-list when few people should ever touch the field (the safer default for customer master data), block-list when one identified group is the problem.

Script vs. Customizer panel lock

The alternative is a Customizer panel customization, scoped by Customization Group in User Maintenance, that locks or hides the salesperson field. It works, but it is per-panel work that has to be maintained through upgrades and can complicate extended solutions; the script approach is one small object, applies at the data layer rather than the screen, and was the method the thread's experienced users recommended. One clarification the thread had to settle: IsMember reads the user's role from User Maintenance — the Customization Group field is a different thing that only governs panel customizations, despite the similar names.

What doesn't work

  • Hunting Role Maintenance for a field-level right. It stops at task level. The poster searched thoroughly; the right does not exist.
  • Testing in a task session that was already open. The script will not appear to exist until the task is restarted — mid-thread this produced both a false pass and a false "it blocks everyone" scare. Restart the task, and test with an account whose role membership you have actually checked.
  • Pointing the check at the built-in admin role when supervisors need the ability. That forces an all-or-nothing choice between "can change salesperson" and "has full admin." The dedicated role exists precisely to grant this one ability on its own.

Affected versions

Confirmed working on Sage 100 ERP 2013 (the original case) and, for the inverted variant, Sage 100c Advanced 2017. The method relies only on Role Maintenance and User-Defined Scripts, so it carries to other Sage 100 versions with those features — but your coverage is only as complete as your list of attached tables and fields.

Prevention / best practice

  • Audit the salesperson field's exposure once, properly: Customer Maintenance, Sales Order Entry, ship-to addresses, and any import or utility path your team actually uses — then attach the event to all of them in one pass.
  • Name the role in lowercase and document the script, the role, and the attached tables together in your Sage admin notes; the next administrator should not have to reverse-engineer why a field rejects changes.
  • Keep the block message polite and instructional — it will be read by frustrated staff at month-end, and "contact a supervisor" tells them the way out.

Related help

Still stuck? Send us a screenshot of the error, we will diagnose it for free.

Digit Masters has supported Sage 100 and Sage 300 since 1997. Send the screenshot through our contact page or to contact@digitmasters.com, or call (800) 965-4262.

Ready to Optimize Your Sage ERP?

Speak with a CPA-led Sage consultant. Free initial consultation — English or Chinese.

Get a Free Consultation