Write transaction in the scope of a TryFunction
#911
rvanbekkum
started this conversation in
New Rule
Replies: 1 comment 1 reply
|
This is already discussed in #539 I totally understand why you didn't find that before posting this suggestion. 😅 It was closed with this comment from @Arthurvdv:
But I agree with you, IF it was possible to create such a rule, it would be really nice. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Starting a write-transaction in the scope of a procedure that is marked with the
TryFunctionattribute is not allowed whenDisableWriteInsideTryFunctionis set totrue(for BC online it is set totrue, for BC on-premise it is set tofalsewhich is the recommended value, but that's a different discussion).It would be good if a diagnostic could be raised if there is a write-transaction in the scope of a
TryFunctioninside the code of the extension itself. That would be in the procedure itself and in any procedures that are invoked by theTryFunctionthat are contained in the same extension. If theTryFunctioninvokes procedures from other apps/extensions, then I don't think it can be checked whether there are any write transactions in the procedures of the other apps/extensions.However, I think it still would be very useful to at least have a check that checks it this far (the code within the same extension).
Examples of procedures that are not allowed inside the scope of a
TryFunction:And probably some others that I have missed.
All reactions