{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40772,"path":"platform-security/c_DomainAssignment.md","title":"Domain assignment","bundle":null,"doc_type":null,"release":"australia","body":"\n# Domain assignment\n\nBy default, domain separation adds a domain field to tables and their extensions.\n\nYou can also extend domain separation to any new tables you create by adding a **sys\\_domain** field to the table's dictionary definition. By default, the system only domain-separates platform and baseline application tables where appropriate.\n\n**Warning:** ServiceNow does not recommend domain-separating platform tables \\(any table with the sys\\_ prefix such as the Dictionary Entry \\[sys\\_dictionary\\] and Dictionary Entry Override \\[sys\\_dictionary\\_override\\] tables\\) because it can produce unexpected results.\n\nEach record is assigned a single domain. That domain is stored in the **sys\\_domain** field. Several tables, by default, have the **sys\\_domain** column and are already domain separated.\n\nThe value of the **sys\\_domain** field contains the domain assigned to the record by any of the following:\n\n-   Company to which the user belongs\n-   Business rule when creating record\n-   Module used when creating record\n-   Form template used when creating record\n-   Domain of the parent record\n-   Domain assigned to User record\n-   Domain of the user who creates it\n\nThe system prevents the following tables from being domain separated:\n\n-   Access Control `[sys_security_acl]`\n-   Script Include `[sys_script_include]`\n-   System Property `[sys_properties]`\n-   Security Exclusion/Inclusion List Entities `[sys_security_restricted_list]`\n-   Dictionary Entry `[sys_dictionary]`\n-   Dictionary Entry Override `[sys_dictionary_override]`\n\n## Assigning users to companies\n\nAdministrators can quickly assign users to a domain by assigning them to a company. After users are assigned to a domain, records automatically inherit the user's domain.\n\nFor example, assigning Bow Ruggeri to the ACME company automatically assigns him to the ACME domain. Assigning Don Goodliffe to the Initech company automatically assigns him to the Initech domain. Any records they create are automatically added to the appropriate domain.\n\n## Using business rules to assign domains\n\nAdministrators can use a business rule to automatically set a domain value when creating a record. The business rule must set a value in the **sys\\_domain** field. Administrators must ensure there is a **sys\\_domain** column available for the record's table. To learn more see [Domain separation recommended practices for service providers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/bp-domain-sep-recommended.md).\n\n## Using modules to assign domains\n\nAdministrators can use the **sysparm\\_domain** URL parameter to automatically assign new records to a particular domain from a module. Administrators must create a module with an **Argument** value of: `sysparm_domain=sys_ID of domain`.\n\n## Using form templates to assign domains\n\nAdministrators can use a form template to automatically assign new records to a particular domain. Administrators must add the **sys\\_domain** field to the form and select a domain value. For example, setting the **sys\\_domain** field to **TOP/ACME domain** automatically assigns all records from this template to the TOP/ACME domain.\n\n## Domain inheritance on tables\n\nBy default, related records inherit the domain of the parent record. For example:\n\n-   A change task record inherits the domain of the parent change request record.\n-   A problem record inherits the domain of the parent incident record.\n\n## Automatic domain assignment based on user domains\n\nIf no other domain conditions apply, a record automatically inherits the domain of the user who creates it.\n\n**Parent Topic:**[Exploring domain separation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/c_DomainSeparation.md)\n\n**Related topics**  \n\n\n[Configuration that can be delegated to internal or external customers]()\n\n[Visibility domains and Contains domains]()\n\n[Domain scope]()\n\n[Concepts for service providers]()\n\n[Installed with domain separation]()\n\n"}}