Hi, I am writing a job that dumps info from Axapta into another database using OdbcConnection. One issue I have is that some Axapta fields contain data with single quotes, i.e.: Here’s the info… So, the other database needs single quotes escaped, basically I need to change it to: Here’'s the info… So, I am new to Axapta dev and while it looks like I could write a method based by combining a few other string functions, I was wondering if there was an easier way or if someone had already done this… Thx.
Hi, U can use the follwing: strVariable = strReplace(strVariable,’’’,’’’’); Hth, Ciprian
Great - thanks! Is there a place in Axapta that I could documentation on this function?
There are 2 place to find global functions in Axapta: AOT\System documentation\Functions - these are kernel functions, which can’t be modificed, debugged, and usually these are documented. The other place is AOT\Classes\Global - all this class’s methods are global functions in Axapta, and they are build based upon the kernel functions (e.g. strReplace). So, instead of typing Global::StrReplace (which is not wrong), you can simply call the function by its name. The Global helps users define their own Axapta global functions. These methods usually should be explaind under AOT\Application developer documentation\Classes\Global but unfortunatelly there is none with documentation. However, viewing the source code is easier to understand it. Another usefull tool in Axapta is Code explorer (right click on a class method\Add-ins submenu. This will display the source code in a on-line help windows, helping understand better every variable and objects used it there.