It won't let me execute during that event.
The following AL methods 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 method to save the changes before this call, or structure the code differently.
Contact your application developer for further assistance.
Thanks for the reply
If what you are trying to do is the execute the report you must use the report.execute or report.print commands.
Please see this doc:
docs.microsoft.com/.../reportinstance-execute-method
The report = method will not be recognized i think.
André Arnaud de Cal...
294,281
Super User 2025 Season 1
Martin Dráb
233,019
Most Valuable Professional
nmaenpaa
101,158
Moderator