Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISOLATEDSTORAGE Runmodal error #5445

Closed
geogarin opened this issue Nov 13, 2019 · 4 comments

Comments

@geogarin
Copy link

@geogarin geogarin commented Nov 13, 2019

The code:

ISOLATEDSTORAGE.SET(‘myKey’,’MyValue’,DATASCOPE::User); // and any other datascope
PAGE.RUNMODAL(0,customer);

Cause error:
Microsoft Dynamics 365 Business Central
—————————

The following C/AL functions are limited during write transactions because one or more tables will be locked. Form.RunModal is not allowed in write transactions. Codeunit.Run is allowed in write transactions only if the return value is not used. For example, ‘OK := Codeunit.Run()’ is not allowed. Report.RunModal is allowed in write transactions only if ‘RequestForm = FALSE’. For example, ‘Report.RunModal(…,FALSE)’ is allowed. XmlPort.RunModal is allowed in write transactions only if ‘RequestForm = FALSE’. For example, ‘XmlPort.RunModal(…,FALSE)’ is allowed. Use the COMMIT function to save the changes before this call, or structure the code differently.
—————————
OK
—————————

@geogarin

This comment has been minimized.

Copy link
Author

@geogarin geogarin commented Nov 13, 2019

Because it inserts record into "Isolated Storage" table, it starts new transaction and this cause such error. I can do such table myself and cover it with same functions. What is the advantages of using ISOLATEDSTORAGE?

@atoader

This comment has been minimized.

Copy link
Member

@atoader atoader commented Nov 13, 2019

This repository no longer handles general questions and is only dedicated to bug reports for the latest preview version of the AL compiler and developer tools.

To get help for your question please use one of the following resources:
Business Central Community
mibuso forum
Dynamics User Group

@atoader atoader closed this Nov 13, 2019
@geogarin

This comment has been minimized.

Copy link
Author

@geogarin geogarin commented Nov 13, 2019

It's not question. It's bug!

@atoader

This comment has been minimized.

Copy link
Member

@atoader atoader commented Nov 13, 2019

That was not apparent because you have not followed the bug reporting template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.