Dynamics Search Engine

Monday, January 5, 2009

How to use HTML Editor or HTML syntax composer in Microsoft Dynamics Ax or Axapta

Disclaimer: There is no warranty on this article. Use at your own risk.

Applied on: Dynamics Ax 4.0

Pre-requisites: You should have X++ programming knowledge


This article explains:

How to use HTML Editor or HTML syntax composer in Microsoft Dynamics Ax or Axapta.

How to publish Job ads in html format.


Some times you need a solution where html editor or html syntax composer is required to avoid the wrong inputs from the user. So your solution is here.

Dynamics Ax has this feature but if you are not aware of it then … :)


Go to the
HRM main menu then open Recruitment projects form. On this form there is button called Job ads. Click on this button.






It will open the Job ads form where data will be displayed wrapped by an html control on the form as shown below.


If you click the Edit button on the Job ads form it will open the HTML editor as shown below.


Click on the HTML tab to see the text with html tags.


To open the HTML editor programmatically you need to use 'CCHTMLEditor' class.

Lets say you have a button and on click event of the button you want to call the HTML editor; so your code goes like:


void clicked()

{

CCHTMLEditor CCHTMLEditor;

HRMRecruitingJobAd hrmRecruitingJobAd;

;

super();

ccHTMLEditor = new CCHTMLEditor(‘Your table name’,

fieldNum([Your Table name], [Field name of your table]),

element,

[Name of the HTML control]);

ccHTMLEditor.run();

}



Your table field should be extended to CCHTMLString EDT as shown above.

2 comments:

  1. Hi, do u have any idea about how to open editor in enterprise portal

    ReplyDelete
  2. Thanks for the wonderful information .Free text to HTML converter
    Keep sharing

    ReplyDelete