Remove Excel CR+LF Errors

Administrator
Member, Moderator, Administrator Posts: 2,506
Remove Excel CR+LF Errors
Scans all Code and Textfields of your database in every company.
In this Ready-to-use version also the writeprotected Ledgertables 17,21,25,32,379,380,5802 (permissions set to Modify allowed).
The CU automatic skips tables you haven't rights to read or write.
It checks every field for containing one ore more codes of 00 0D 0A.
If found, the codes whill be removed from the field, and the record is stored (only in this case). You can search for all (forbiden) chars you want, just change the String ForbiddenChars.
You get this codes (0D 0A) if you copy and paste a cell from Excel (all versions) in a text- or codefield of Navision (all Versions).
This CU uses the RecordRef and Fieldref, so it will run only from Navision 3.70 up.
It is written in 4 SP3HF69, but should be importable to any version from 4 up, maybe also on 3.70.
You can run this CU in Automationmodus (guiallowed).
If you want to change the tables to scan, you need
-to remove all permissions if you don't have AL-Licence
-change the "CheckThisTable" as you want. Some Examples are included.
There might be more to done, e.g.
-use a record filled in the ChangeLog, so only wrong Entries are to scan and to correct
-use a Table or Form to configure the Tables to check
-....
As usual: Use at your own risk, test it befor real-use in a test-enviroment, check the results, love your mom and Dad, and leave the first line of this documentation. Feel free to copy, modify and upload this CU to any sources/HP you want.
http://www.mibuso.com/dlinfo.asp?FileID=1011
Discuss this download here.
Scans all Code and Textfields of your database in every company.
In this Ready-to-use version also the writeprotected Ledgertables 17,21,25,32,379,380,5802 (permissions set to Modify allowed).
The CU automatic skips tables you haven't rights to read or write.
It checks every field for containing one ore more codes of 00 0D 0A.
If found, the codes whill be removed from the field, and the record is stored (only in this case). You can search for all (forbiden) chars you want, just change the String ForbiddenChars.
You get this codes (0D 0A) if you copy and paste a cell from Excel (all versions) in a text- or codefield of Navision (all Versions).
This CU uses the RecordRef and Fieldref, so it will run only from Navision 3.70 up.
It is written in 4 SP3HF69, but should be importable to any version from 4 up, maybe also on 3.70.
You can run this CU in Automationmodus (guiallowed).
If you want to change the tables to scan, you need
-to remove all permissions if you don't have AL-Licence
-change the "CheckThisTable" as you want. Some Examples are included.
There might be more to done, e.g.
-use a record filled in the ChangeLog, so only wrong Entries are to scan and to correct
-use a Table or Form to configure the Tables to check
-....
As usual: Use at your own risk, test it befor real-use in a test-enviroment, check the results, love your mom and Dad, and leave the first line of this documentation. Feel free to copy, modify and upload this CU to any sources/HP you want.
http://www.mibuso.com/dlinfo.asp?FileID=1011
Discuss this download here.
0
Comments
-
First of all thanks for this piece of code.
When i try to run the codeunit i got the following error (translated from dutch)
The variable RECORDEF is not closed. Please close the variable RECORDREF with CLOSE before opening a new table.
Version is 5.0 SP10 -
Ups, excuse this late answer, just read your comment.
In Before-5 Versions Navi closed the RecRefTable autoamticaly before re-open an new one.
just change this lines (fix will also work in "older" Navisions)
END;
UNTIL Companys.NEXT = 0;
to
END;
RecordRefTable.CLOSE;
UNTIL Companys.NEXT = 0;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
- 320 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