{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":789,"path":"api-reference/server-api-reference/GlideDynamicNamespaceAPI.md","title":"GlideDynamicNamespace - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# GlideDynamicNamespace- Global\n\nThe GlideDynamicNamespace API provides access to dynamic namespace metadata.\n\nThis API provides methods that enable you to get dynamic schema values defined in the Dynamic Namespace \\[dynamic\\_namespace\\] table. For more details on dynamic namespaces, see [Dynamic Schema](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/dynamic-schema.md).\n\nSee also:\n\n-   [GlideDynamicAttribute - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/GlideDynamicAttributeAPI.md) — getNamespaceName\\(\\)\n-   [GlideDynamicAttributeStore - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/GlideDynamicAttStoreAPI.md)\n    -   getDynamicNamespace\\(\\)\n    -   setDynamicNamespace\\(\\)\n-   [GlideElement - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideElementAPI.md) — getDynamicNamespace\\(\\)\n-   [GlideElementDynamicAttributeStore - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/GlideElementDynamicAttStoreAPI.md) — getDynamicNamespace\\(\\)\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## GlideDynamicNamespace - getName\\(\\)\n\nGets name of the dynamic namespace.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Value of the dynamic namespace's name property.|\n\nThe following example shows how to get the name of a dynamic namespace. In this example, the dynamic attribute store field associated with the namespace is `u_attributes`.\n\n```\nvar gr = new GlideRecord('u_product');\ngr.query();\ngr.next();\n\ngs.info(\"Dynamic namespace: \" + gr.u_attributes.getDynamicNamespace().getName());\n```\n\nOutput:\n\n```\nDynamic namespace: u_product/u_attributes\n```\n\n## GlideDynamicNamespace - isActive\\(\\)\n\nReturns whether an object is an active dynamic namespace.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n<table id=\"table_o5y_sln_b2c\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates if a dynamic namespace is active.Valid values:\n\n-   true: The dynamic namespace is active.\n-   false: The dynamic namespace is not active.\n\n</td></tr></tbody>\n</table>The following example shows how to determine if a dynamic namespace called `u_product/u_attributes` is active. In this example, the dynamic attribute store field associated with the namespace is `u_attributes`.\n\n```\nvar gr = new GlideRecord('u_product');\ngr.query();\ngr.next();\n\ngs.info(\"Dynamic namespace: \" + gr.u_attributes.getDynamicNamespace().getName());\ngs.info(\"Active true/false: \" + gr.u_attributes.getDynamicNamespace().isActive());\n```\n\nOutput:\n\n```\nDynamic namespace: u_product/u_attributes\nActive true/false: false\n```\n\n## GlideDynamicNamespace - isTransient\\(\\)\n\nReturns whether an object is a transient dynamic namespace.\n\n-   Dynamic namespaces are defined in the Dynamic Namespace \\[dynamic\\_namespace\\] table with a data type and a sys\\_id.\n-   Transient dynamic namespaces are dynamic namespaces that have been added to a DynamicAttributeStore field without a definition in the Dynamic Namespace \\[dynamic\\_namespace\\] table. Transient dynamic namespaces only contain transient attributes.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n<table id=\"table_o5y_sln_b2c\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates if a dynamic namespace is transient.Valid values:\n\n-   true: The dynamic namespace is not transient.\n-   false: The dynamic namespace is transient.\n\n</td></tr></tbody>\n</table>The following example shows how to determine if a dynamic namespace called `u_product/u_attributes` is transient. In this example, the dynamic attribute store field associated with the namespace is `u_attributes`.\n\n```\nvar gr = new GlideRecord('u_product');\ngr.query();\ngr.next();\n\ngs.info(\"Dynamic namespace: \" + gr.u_attributes.getDynamicNamespace().getName());\ngs.info(\"Is transient? t/f: \" + gr.u_attributes.getDynamicNamespace().isTransient());\n```\n\nOutput:\n\n```\nDynamic namespace: u_product/u_attributes\nIs transient? t/f: false\n```\n\n"}}