RTC Text Editor Control Addin for Nav 2009
September 28th, 2010
Some cases of requirement, I need to have text editor in Navision that does not limited to 1K of string and I need able to have break line and simple decoration. This large text could be for explanation of production description, shipping handling or document requirement or could be some comment. So I try to develop a new stuff in Nav 2009 sp1 features call control Addin an as usual using Visual Studio Express Edition 2010 to create one.
I have only simple objective which able to write text freely using RichTextBox .net control and store in into Blob field as expected. There are little troublesome I found that I could not use enter in the Richtextbox control under the RTC Page. It is not good to have rich text box without ability to create a break line certainly. So eventually I end up displaying button on the RTC page and when user click the button, it will pop up a modal window with Richtextbox. Here below the overall pictures.
To make this blog article short, I will directly to the important point in development while the detail and the source code project is attached in this article. So please try it and use it freely. The important points in this development as follow:
- Add reference to Microsoft.Dynamics.Framework.UI.Extensibility.dll which you can found it in RTC installed folder.
- Don’t forget to use class attribute ControlAddInExport to give a name for your control addin name when you call it from RTC page. I call it “NavEditorAddin”.
- My control add in class will inherit from WinFormsControlAddinBase and importantly also implement interface IValueControlAddInDefinition. This interface gives me the only possibility to have two ways of data binding which mean Display and Update back the changes to database.
- Create a strong name key file and sign the assembly in visual studio project property.
- Compile the project and copy the generated Dll into .. \RoleTailored Client\Add-ins folder where the RTC will need it.
- Make the dll register in global assembly. You can do drag and drop into assembly folder in C:\Windows\assembly or using command line GACUTIL –I <the assembly file>. Note GACUTIL is .net framework utility tools.
- Once successful registered, you can find the public key token in the assembly folder itself. Find your class assembly there and right columns on the side display a key.
- On the classic client, you need to register the control add in by entering a new line into a virtual table 2000000069 Client Add-in
In the page where you want to use the text editor you will need to change following property. Please note, I am using a BLOB field as my SourceExpr.
Here is the project source code and enjoy!
Cheers!



October 26th, 2010 at 1:34 pm
I have just read your blog from start to finish!
http://mibuso.com/blogs/mandyk/
You are sharing all this knowledge/efforts and work globally!
This is amazing!
One of the top 5 blogs on Dynamics NAV out there!
It really helped us move forward , thanks!
July 28th, 2011 at 7:46 pm
This site is like a classroom, ecxept I don’t hate it. lol
November 15th, 2011 at 9:04 pm
This AddIn is quite nice. But if you change/input a value into the BLOB and afterwards Trigger an OnValidate-event of another field in this table, the changes/input in the BLOB is gone.
Is there a fix for this?
December 10th, 2011 at 5:35 pm
Hello,
very good! One question: As you described it, you need to invoke the text editor by clicking “Show Editor”. Is it possible to always show the Editor inside the Fast Tab named “TextNoteArea”
May 30th, 2013 at 3:20 am
Hi,
I actually need the simple thing you mentioned, a text area in the page itself, no rich text, no line feeds, just text area taking more than 256 characters, like notes. I can\’t use notes because I need several such fields on the same object. Would you still have a copy of your early tests with the simple textarea by any chance?
June 4th, 2013 at 10:21 am
Hi Anton,
I already put the link “Project Source Files” in this article and you can download it. As suggestion, try to use computer browser to open this article. Thanks