Solution of CTRL+F5 error in General Ledger module in Microsoft Dynamics AX 2012
Sometimes while entering the data and creating journals, orders and invoices etc. in Microsoft Dynamics AX 2012, the user gets irritated if errors come up again and again. One of the example of such problem is the error which occur when modifying the date in journal lines. The error was so irritated that you have to press CTRL+F5, and then the error goes. And then if you modify the date of other line, you have to press CTRL+F5 again. It means that if you want to change the date of 100 lines of 10 vouchers, you have to press CTRL+F5 100 times. The following error comes up:
Cannot edit a record in Journal lines (LedgerJournalTrans).
The values displayed in the form are not current, so an update or deletion cannot be done. To view the current values, on the Command menu, click Restore or press CTRL+F5.
I have resolved this issue and automated the work. Now, if you have 100 lines of 10 vouchers, you have to enter date 10 times only. Like, you have to enter the date of each line of every vouchers. And yes, the solution consists of only one line of code. On the modified() method of the control of data, that is TransDate field, I have written a line which removes the error as well as automate the work. if you modify the date in one line of journal lines, it will be copied to all the lines of same voucher number in the current journal. See the video below:
If you have a better solution or if you found any ambiguity, please comment.
Blog: Click here
GitHub: Click here
Youtube Channel: Click here
Opportunities don’t happen. You create them. – Chris Grosser