Posts

Split a string into a container in Microsoft Dynamics 365

Image
Some times when developing we encounter some strings of which we only need a segment of the string, let’s say for example the addresses on AX that are formed by several lines. So When you run in the need to separate a String in several parts, you can use the method that we are creating in this post, this function will take 3 parameters: String Delimiter Index This methods will require some variable to be declared previously: Declare Variables:         List _list = new List ( Types ::String);          container con;         ListIterator iterator;         str String;         ;         String = "Raji-Jones-Leena-Mangomani" ;         _list =  Global ::strSplit(String, "-" );         iterator = new ListIterator (_list);         while (iterator.more())         {             con += iterator.value();             iterator.next();         } Now we have a populated container and,   using the “conPeek” standar

Important function in x++ for D365

Important function in X++             I would like to share some important function in x++ Like            ·         subStr(),               ·    strCmp(),    ·         strDel() ,    ·          strFind (),              ·         strfmt () ,     ·         strLen (), ·         strLwr (),              ·     strUpr (),     ·         strRep(),    ·         systemDateGet(),   ·         today(),       ·         trunc (), ·         boxExample (),    ·     conins(),      ·         conLen(),   ·          conPeek(),  ·             ·         conNull()  which seems to easy but some time became very tough to recall in between to coding, so don’t worry and keep coding…….              Sub String in X++             // for cut a string from given posititon SubStr("ABCDEFGHIJ",7,-4) returns the text string "DEFG" (the specified sub-string).         static void subStr( Args _args)         {             str s;             real   r;              ;