Transaction Type Error in Report
Ravi_Prakash_Goyal
Member Posts: 72
Hi,
I get following error when I run Refresh function from Released Prod. Order. I have to run 'Refresh' twice. The first time it runs I get below error. The second time everything runs perfectly.
"You cannot change the transaction type after you start the transaction.
A transaction starts when the program executes the first database operation, such as FIND, NEXT, INSERT, DELETE, MODIFY, SUM, and COUNT.
The error occurred because you were trying to change the transaction type from UpdateNoLocks to Update."
Refresh function calls "Refresh Production Order" report (ID 99001025) with Request Form.
REPORT.RUNMODAL(REPORT::"Refresh Production Order",TRUE,TRUE,ProdOrder);
The only thing I did is supressed the Request Form as below to directly run the Refresh process
REPORT.RUNMODAL(REPORT::"Refresh Production Order",FALSE,TRUE,ProdOrder);
I am using NAV 2009 R2 database, where the "Transaction Type" property is set to 'Update' in report 99001025 in standard NAV, as compared to '<UpdateNoLocks>' in 4 SP3. When I change this property to '<UpdateNoLocks>' it works fine.
The only doubt here is what is the role of RequestForm in all this. If the "Transaction Type" property is 'Update' and RequestForm = TRUE, system does not give error. But if the RequestForm = FALSE, system throws an error.
Any suggestions/opinions.
I get following error when I run Refresh function from Released Prod. Order. I have to run 'Refresh' twice. The first time it runs I get below error. The second time everything runs perfectly.
"You cannot change the transaction type after you start the transaction.
A transaction starts when the program executes the first database operation, such as FIND, NEXT, INSERT, DELETE, MODIFY, SUM, and COUNT.
The error occurred because you were trying to change the transaction type from UpdateNoLocks to Update."
Refresh function calls "Refresh Production Order" report (ID 99001025) with Request Form.
REPORT.RUNMODAL(REPORT::"Refresh Production Order",TRUE,TRUE,ProdOrder);
The only thing I did is supressed the Request Form as below to directly run the Refresh process
REPORT.RUNMODAL(REPORT::"Refresh Production Order",FALSE,TRUE,ProdOrder);
I am using NAV 2009 R2 database, where the "Transaction Type" property is set to 'Update' in report 99001025 in standard NAV, as compared to '<UpdateNoLocks>' in 4 SP3. When I change this property to '<UpdateNoLocks>' it works fine.
The only doubt here is what is the role of RequestForm in all this. If the "Transaction Type" property is 'Update' and RequestForm = TRUE, system does not give error. But if the RequestForm = FALSE, system throws an error.
Any suggestions/opinions.
0
Comments
-
Another update. I got following error on running the 'Refresh' function in Released Prod. Order after I changed Transaction Type = UpdateNoLocks and RequestForm = FALSE in Report.Runmodal command in 'Refresh Production Order' Report (ID 99001025).
"Another user has modified the record for this Production Order after you retrieved it from the database.
Enter your changes again in the updated window, or start the interrupted activity again.
Identification fields and values:
Status='Released',No.='PRD063170'"
To resolve this I added 'LOCKTABLE' command in Production Order - OnPreDataItem trigger to resemble it to Transaction Type = 'Update'. It resolved the above error.
But my question is still same, How the RequestForm = TRUE/FALSE is impacting the Locking of table. If the "Transaction Type" = 'Update' in Report property and RequestForm parameter = TRUE in Report.Runmodal command, system does not give error. But if the RequestForm parameter = FALSE, system throws an error.
Please advice. Thanks.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions