Description:-
In this Article we will Create Spell Checker in Dynamics Ax through Job to Check Spelling in your Container for Correct Word. If you’re Spell is not Correct then it will give you A correct Word for that Spell in Dynamics Ax.
Code:-
static void SpellChecker(Args _args) { SysSpellChecker sysSpellChecker; container spellings; ListEnumerator listEnumerator; List spellingsSuggestions; int i; ; spellings = ['Tble', 'Bal', 'Funni']; // Get AX –> Current Language id // Construct the sysSpellChecker object. sysSpellChecker = SysSpellChecker::newCurrentDocumentationLanguage(); startLengthyOperation(); for(i=1; i<= conlen(spellings); i++) { if(!sysSpellChecker.checkSpelling(conpeek(spellings, i))) { spellingsSuggestions = sysSpellChecker.getSpellingSuggestions(conpeek(spellings, i)); listEnumerator = spellingsSuggestions.getEnumerator(); info(strFmt("Suggested Spellings for: %1",conpeek(spellings, i))); while(listEnumerator.moveNext()) { info(strFmt("%1",listEnumerator.current())); } } } sysSpellChecker.finalize(); info("Spell checking is Done"); endLengthyOperation(); }
Thanks for comments.....