by Mien Trung Software

Run multiple companies inside one SuiteCRM with full data isolation, per-company record numbering, and zero extra infrastructure. One instance, any number of companies, no compromises.

Includes a 30 day guarantee
Try it Now

Admin Guide

MTS Multi Organization — Admin Guide

Administration Overview

Module / Area Function
Admin → Enable Modules Activate plugin, select isolated modules, designate admin users
Admin → Manage Companies CRUD for company records
Admin → License Enter and validate the SugarOutfitters license key
Companies → Detail View → Numbering Config Configure per-company numbering rules
Admin → Numbering Rules Global numbering rules across all companies

1. Plugin Configuration (Enable Modules)

Path: Admin → MTS Multi Organization → Enable Modules

Activate / Deactivate

Toggle Activate MTS Company Manager ON to enable all isolation features. When OFF, the plugin is installed but dormant — no SQL filtering, no hooks, no numbering.

Admin Users

The multi-select list shows all active SuiteCRM admin users. Selected users become "visible admins" — they can see records from all companies and access the plugin configuration. Non-selected admin users are treated as regular users (company-scoped).

Super-admin (user ID 1) always has full access regardless of this setting.

Module Selection

Click a module tile to toggle isolation ON/OFF for that module.

Action What happens
Enable a module Installs mts_cm_company_id_c relate field on the module's table; rebuilds extensions
Disable a module Removes the relate field; rebuilds extensions

Supported modules include any SuiteCRM module that has a DB table (Accounts, Contacts, Opportunities, Cases, Leads, Quotes, Invoices, and any custom modules).


2. Managing Companies

Path: Admin → MTS Multi Organization → Manage Companies (or Companies module)

Create a Company

  1. Click Create Company in the list view.
  2. Fill in the required Name field and any desired fields:

Company Information

Field Required Description
Name Yes Unique company identifier
Phone No Main contact number
Email No Main contact email
Website No Company website URL
Billing Address No Full billing address
Shipping Address No Full shipping address

Legal Information

Field Required Description
Trade Name No DBA / trading name
Legal Form No GmbH, LLC, Ltd, SAS, etc.
Registration No. No Company registration number
Court of Registration No Registered court or authority
Tax ID No Tax identification number
VAT No. No VAT registration number
Managing Directors No Names of directors
Share Capital (EUR) No Registered share capital
Country of Incorporation No Country where company is registered

Bank Details

Field Required Description
Bank Name No Name of the bank
Bank Account No. No Account number
IBAN No International Bank Account Number
BIC / SWIFT No Bank identifier code
SEPA Creditor ID No For direct debit mandates

Commercial

Field Required Description
Payment Terms (Days) No Default payment terms in days
  1. Click Save.

Assign Users to a Company

  1. Open the Company record.
  2. Scroll to the Users subpanel.
  3. Click Select and pick users from the popup.

A user can belong to multiple companies. At login, if they belong to more than one company, they are redirected to the company picker (availableCompanies view) to choose a context for the session.

Numbering Config (per company)

From the Company detail view, click Numbering Config to open the numbering modal for that specific company. See Section 3 for details.


3. Numbering Rules

Path: Admin → MTS Multi Organization → Enable Modules → Numbering Rules
(or: Company detail view → Numbering Config button)

How Numbering Works

When a new record is saved in an enabled module:

  1. The before_save hook fires.
  2. The company context is read from the record's mts_cm_company_id_c field.
  3. The numbering rule for that company + module is fetched.
  4. If the target field is empty, the number is generated and written to the field.
  5. The counter is atomically incremented (concurrent saves are safe).

Add a Numbering Rule

Field Required Description
Company Yes Which company this rule applies to
Module Yes Which SuiteCRM module triggers numbering
Target Field Yes Which field receives the generated number
Format Pattern Yes Template string with tokens (see below)
Prefix No Static prefix inserted at {PREFIX} token
Padding (digits) No Default zero-padding width for {N}
Reset Period No Never / Daily / Monthly / Yearly
Active No Toggle to enable/disable the rule

Format Pattern Tokens

Token Description Example
{PREFIX} Value of the Prefix field ACME
{YYYY} 4-digit year 2025
{YY} 2-digit year 25
{MM} 2-digit month 07
{DD} 2-digit day 14
{N} Counter, padded to Padding digits 00042
{N:5} Counter padded to exactly 5 digits 00042

Example patterns:

Pattern Sample output
{PREFIX}-{YYYY}-{N:5} ACME-2025-00001
INV-{YY}{MM}-{N:4} INV-2507-0001
{PREFIX}/{YYYY}/{MM}/{N} ACME/2025/07/00001

Reset Period Behaviour

Period Counter resets when
Never Never resets
Daily First save of a new calendar day
Monthly First save of a new calendar month
Yearly First save of a new calendar year

The reset uses a conditional UPDATE to prevent duplicate 1 values under concurrent saves.


4. License Management

Path: Admin → MTS Multi Organization → License

  1. Retrieve your license key from SuiteCRM Store → Account → Purchases.
  2. Paste it into the License Key field.
  3. Click Validate.
  4. On success, click Continue to return to configuration.

The validation result is cached for 7 days (weekly frequency). If the license expires or validation fails, the plugin disables itself silently and logs a warning in suitecrm.log.


5. Advanced Settings

Company Context in Logic Hooks

The hook setCompanyForRecord (position 99) runs before applyNumbering (position 100). It reads the company from the user's session and writes it to mts_cm_company_id_c on the bean. The numbering hook reads from the bean directly, not from the session, so it works correctly even when admins save records in "ALL" mode.

SQL Filtering

The plugin overrides SugarBean::create_new_list_query() via custom/modules/*/ class extensions. The WHERE clause added is:

{table_name}.mts_cm_company_id_c = '{company_id}'

This clause is skipped for: super-admin, visible admin users, "ALL" company context, disabled modules, and modules without the mts_cm_company_id_c field.


6. Backup and Restore

Before Upgrade

  1. Export all companies: Companies → List View → Export.
  2. Back up the mts_company and mts_company_numbering tables.
  3. Note the current version from Admin → Module Loader → Installed Packages.

After Reinstall / Upgrade

  1. Install the new ZIP via Module Loader.
  2. Run Quick Repair and Rebuild → Execute for any new SQL.
  3. Re-validate the license if prompted.
  4. Verify enabled modules and numbering rules are intact.

7. Maintenance

Reset Numbering Counter

To reset a rule's counter manually:

UPDATE mts_company_numbering
SET next_number = 1, last_reset_date = NULL
WHERE id = '{rule_id}';

Clean Orphaned Rules

After deleting a company, soft-delete its orphaned numbering rules:

UPDATE mts_company_numbering
SET deleted = 1
WHERE company_id NOT IN (SELECT id FROM mts_company WHERE deleted = 0);

8. Common Troubleshooting

Users see records from other companies 1. Confirm the module is selected in Enable Modules. 2. Check the user is assigned to a company in the Companies → Users subpanel. 3. Run Repair → Rebuild Extensions and clear the session cache.

Numbering not generating on record save 1. Verify the rule is Active in the Numbering Rules panel. 2. Check that the target field is empty before save (numbering skips non-empty fields). 3. Confirm the user's company is set (mts_cm_company_id_c on the bean after save). 4. Check suitecrm.log for MTS_CM: warning entries.

License validation fails with "Unable to reach license server" 1. Check outbound HTTPS (port 443) to store.suitecrm.com is not blocked. 2. Verify cURL is installed and enabled in PHP. 3. Try from the command line: curl https://store.suitecrm.com/api/v1.

Module isolation breaks after Quick Repair Run Repair → Rebuild Extensions specifically — Quick Repair alone may not recompile the custom class extensions used for SQL filtering.

Company picker shown every login This is correct behaviour when a user belongs to more than one company. Assign the user to a single company if the picker is unwanted.


  • Website: mientrungsoft.com
  • Email: anhnhatuit@gmail.com
  • WhatsApp: +84973131884
Saving Comment Saving Comment...