Turn off regular expressions in TextBuffer

When you work with objects of the TextBuffer class they use regular expressions internally when applying operations on the text. So this example probably wouldn’t perform as you’d expect, since “<” is a control character used by the regular expression engine: textBuffer.replace(“<Apples>”, “<Cake”); To mitigate this, you can turn off the regular expression engine: textBuffer.regularExpressions(false);…


Import data from InfoPath forms to AX 4.0

Here is a very high-level description on how you can import data from an InfoPath form to AX 4.0: Create the AX web service you want to use (e.g. to create a sales order) Create a new InfoPath form Define the web service as data source in InfoPath and point InfoPath to the web service’s…


AX 4.0 Enterprise Portal and WSS 3.0 – Themes

When you apply other themes from WSS, like Reflector or Plastic, Enterprise Portal (EP) retains the default theme. This is because EP doesn’t ship with style sheets for all the themes of WSS. To customize the EP style sheet to match the WSS theme you can create a new style sheet file for EP. Take…


Access SharePoint Document Library through UNC Path

I usually don’t just link to other blogs from this blog, but this tip is very helpful and I seem to return to it again and again for reference. So here is the link: http://blogs.msdn.com/solutions/archive/2006/07/19/671873.aspx This posting is provided “AS IS” with no warranties, and confers no rights.


Deploying AX with other directory servers than Active Directory

As you may very well know AX can’t be deployed with other directory servers than Active Directory (AD). But a product like Microsoft Identity Integration Server (MIIS) allows you to integrate between AD and other directory servers. This will allow you to use AD only for AX while continuing to use another directory server for…


SysImport without confirmation dialog

If you run a something like the following, you’ll be met with a confirmation dialog for existing elements.private void importAOT(str fileName){   SysImportElements sysImport = new SysImportElements();    sysImport.newFile(fileName);   sysImport.parmImportAot(true);   sysImport.import();}This is of course not desirable if you are trying to write some kind of automated task. Change the sysImport.import statement to this: sysImport.import(#impRemoveExcess | #impIgnoreCheckStatus); The…


Create file directory on the AOS fileserver from code

WinAPIServer does not have createDirectory method, so best option is to use ClrInterop.static void createFileDirectory(Args _args){      FilePath path;     new InterOpPermission(InteropKind::ClrInterop).assert();     System.IO.Directory::CreateDirectory(path);     CodeAccessPermission::revertAssert();}This posting is provided “AS IS” with no warranties, and confers no rights.


Remove HTML tags from a string

Just stumbled on this little, but usefull, method. Web::stripHTML(…) removes HTML tags from a string and returns the actual text of the HTML string. The HTML must be fairly simple though. This posting is provided “AS IS” with no warranties, and confers no rights.


How to disable a configuration key from X++

Please be aware that by running this code, you’ll loose data in any table associated with the configuration key.ConfigurationKeySet configurationKeySet = new ConfigurationKeySet(); ; configurationKeySet.loadSystemSetup(); configurationKeySet.enabled(configurationKeyNum(MyConfigKey)); SysDictConfigurationKey::save(configurationKeySet.pack()); SysSecurity::reload(true, false); This posting is provided “AS IS” with no warranties, and confers no rights.


What is MST?

I have been with Microsoft for a little more than four years now and twice my team has been involved in an investigation to figure out what MST, as in AmountMST, is short for. Now by writing this blog post I hope to save us from a potential third investigation. Actually this time we found…