Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 10657

Method: disableLockEscalation

$
0
0

SrsReportDataProviderPreProcess::disableLockEscalation Method [AX 2012]

I was working on a long duration report and the report was build using RDP class that extends with SrsReportDataProviderPreProcess. It is the normal report with set based inserts/updates in temp tables. I implemented the complete class with all business logic and now when I run the report I got error as below.

An exception occurred in the query metadata execution. The exception is Cannot select a record in XXX Tmp (XXXX).

Cannot select a record for update when the transaction is not started on the user connection attached. You need to begin transaction on the user connection first.

 after some research I came to know that it is lock escalation issues that are exhibited by preprocessing reports tables that are populated using set-based inserts, that means you can not reselect the records from Tmp table for further updates.

In my scenario I have to do some updates and selects also on Tmp tables as the business logic was quite complex. For my case the method server public static void disableLockEscalation(TableId _tableId) helps me allot as it disables the lock and allow me to update and selects the previously inserted records



Viewing all articles
Browse latest Browse all 10657

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>