Comments
Examples
This fetchxml, using "under", was generated with the current UI (xml formatting modified to pass the malicious input filters):
fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"
entity name="account"
attribute name="name" /
attribute name="accountid" /
order attribute="name" descending="false" /
filter type="and"
condition attribute="accountid" operator="under" /
/filter
/entity
/fetch
But this fetchxml, using "above", cannot be generated with the UI (xml formatting modified to pass the malicious input filters):
fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"
entity name="account"
attribute name="name" /
attribute name="accountid" /
order attribute="name" descending="false" /
filter type="and">
condition attribute="accountid" operator="above" /
/filter
/entity
/fetch
Any "session scope" solution does not solve this problem. "Session Unique ID" is assigned once at the start of the session and does not change. OnAfter... events do not help because if error happens they might not be called (it depends on how the code is structured). OnBefore... events do not help because you want to clean up after the operation has completed.
We need to distinguish separate "actions" happening within a session. Something like global GlobalOperationId (Guid) that would be created at the start of each AL code invocation and would not change until the operation ends.
GlobalOperationId should be also assignable to help distinguish operations happening in the single user action, e.g. batch posting or some complex integration that does many different things like creating documents, posting, etc.