Please wait
Talk to Expert
Microsoft Dynamics Business central

Explore IsolatedStorage Data Type in Business Central

IsolatedStorage in BC

In today’s blog we will learn about IsolatedStorage Data Type and its methods. IsolatedStorage data type is used to store data in an isolated manner in Business Central. The data is stored using IsolatedStorage data type is not shared with other extensions or components in the system. Isolated Storage is key-value-based storage that provides data isolation between extensions.

If we want to develop a custom module within Business Central that requires storing configuration settings, we can use the IsolatedStorage data type to store this data securely within the context of our extension without affecting the rest of the system.

We need to use DataScope Option Type to Identify the scope of stored data in the isolated storage. We can choose below mentioned 4 Options in DataScope:

 

1) Module – Indicates that the record is available in the scope of the app(extension) context.

2) Company – Indicates that the record is available in the scope of the company within the app context.

3) CompanyAndUser – Indicates that the record is available for a user and specific company within the app context.

4) User – Indicates that the record is available for a user within the app context.

Here below is the list of methods which can be used with IsolatedStorage Data Type.

Refer these below links to get more information on IsolatedStorage methods:

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-isolated-storage

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/isolatedstorage/isolatedstorage-data-type

 

Now, Let’s see how we can use above mentioned method in code.

1. SET:

In below example, while opening customer card page, customer no. will be stored.

2. GET-

The value which was stored in isolated storage can be get using Keyvalue in another page through GET method.

3. DELETE –

This will delete the value stored data.

Tips

  • Data stored in IsolatedStorage is not getting reset even after you re-login to the server.
  • IsolatedStorage string value cannot exceed a length of 215 plain characters and special characters take up more space

 

Thank you for investing your time to read our blog! We’re passionate about sharing valuable insights to help you navigate the world of Business Central.

If you’re curious about how we can assist you in reaching your goals, don’t hesitate to get in touch. Our dedicated team is ready to provide support every step of the way.

Let’s turn your vision into reality together!