Announcements
I want to add a "HTML Viewer" control dynamically through X++. This is because I want to add a new control per each attached document I have against an invoice.
My issue is that the "HTML Viewer" control does not have a type defined in the FormControlType enum. It looks like the FormControlType for the "HTML Viewer" gets dynamically created on runtime and I cannot pass it in the "addControl" method. I debugged and it says the "HTMLViewer" is of type "45" and if we check the "FormControlType" enum, it only goes up to 44.
This is what I tried and it did not work because of the form control type (I tried with different control types such as HTML, None, etc but nothing works)
Instead, I also tried using the "FormHTMLControl" but it looks like its deprecated, I do the same logic, instead of the parmHtml I use the setText() method but the form just shows empty. Here is the code I tried with the "FormHTMLControl":
Does anyone knows I can get a workaround for this?
Thank you
Hello Joao,
Have you checked following page: stackoverflow.com/.../use-css-in-d365-fo-html-viewer
André Arnaud de Cal...
294,079
Super User 2025 Season 1
Martin Dráb
232,860
Most Valuable Professional
nmaenpaa
101,158
Moderator