Hello,
I have some custom code which occasionally gives me the following error in a message box:
Error in file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\$tmp00030000.$$$ while reading in record = 50000860
Windows error: =
Error code: 38 = Filename too long
Try again?
Yes/No
No matter how many times I choose the Yes option, the error keeps coming back. If I choose the No option, then I get an error in the infolog:
Cannot edit a record in MyTable (MyTable). The record has been deleted by another user.
The strange thing is that if I try to run my custom code a second time, it almost always works. It seems that I only get this error on the first time that I run the custom code after opening AX. Subsequent runs work fine. Additionally, if i close and reopen my AX client then I will get the error again on the first time that I run my code.
The table that's being updated is not a temporary table. I'm wondering why this error would occur at all and also why doesn't it occur consistently. Why would it only give this strange windows error about the file name being too long on the first try but not on additional tries?
Is there any way to set the temp folder that AX is writing to an alternate location (maybe C:\Temp\) so that the folder name is shorter and hopefully i won't run into this error again? Any other suggestion on dealing with this issue would be greatly appreciated!
Thanks,
Adam