Global Context (XRM idea)
The Global Context provides a centralized framework for managing global
variables and utility functions that can be accessed throughout the application. Similar to
the XRM framework in CRM, the Global Context enhances the application’s capabilities by
enabling consistent access to critical resources and data across various components.
How to use the Global Context?
- Accessing the Global Context:
-
The Global Context is available throughout the application and can be accessed
in any custom JavaScript code or web resources.
- Reading Data from the Backend:
-
Global Context can perform AJAX calls or utilize API endpoints to retrieve data
from the backend.
-
Example methods may include:
-
await executionContext.webApi.retrieveRecord( "entityName","recordId"):
Retrieves data from a specified backend API and processes it as needed.
-
Utility Functions:
-
The Global Context can also include utility functions that provide commonly
needed functionalities across different parts of the application.