AX 2012AX 2012 R3X++

Changing Phone Number Format AX 2012

some times you need to change the phone number format according to your requirement through code so this job will help you for this, what this job does is it checks whether the phone number is in req format that is 923331234567 if it is thn ok other wise it changes the number to the req format
few secanios to check
1. if number is like 03331234567
2. if number is like 0333 1234567
3. if number is like 0333-1234567
4. if number is like 92333 1234567
5. if number is like 92333-1234567

try it .

static void Jobjob(Args _args)
{
int found=0;
int found1=0;
Str mobile=”03331234567″;

found = strscan(mobile,” “,found,strlen(mobile));
found1 = strscan(mobile,”-“,found1,strlen(mobile));
//this function return the position of character if it found.

    if (subStr(mobile,1,2) != “92” || found != 0 || found1 != 0)
    {
       if (subStr(mobile,1,2) == “03”)
    {
        mobile =strDel(mobile,1,1);
        mobile =strIns(mobile,’92’,1);

            if (found != 0)
            {
            mobile = strRem(mobile,” “);
            }
             else if (found1 != 0)
                {
                mobile = strRem(mobile,”-“);
                }
        info(“changed – ” + mobile);
    }
    else if (subStr(mobile,1,2) == “92” || found != 0 || found1 != 0)
        {
        if (found != 0)
            {
            mobile = strRem(mobile,” “);
            }
             else if (found1 != 0)
                {
                mobile = strRem(mobile,”-“);
                }
        info(“changed 1 – ” + mobile);
        }

    }
    else
    {
        info(“ok – ” + mobile);
    }

}

55 thoughts on “Changing Phone Number Format AX 2012

  1. Hello just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading
    properly. I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and both show the
    same results.

  2. I was wondering if you ever considered changing the page layout of your website?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people
    could connect with it better. Youve got an awful lot of text for
    only having 1 or two images. Maybe you could space it out better?

  3. Howdy! I could have sworn I’ve visited this website before
    but after going through a few of the posts I realized it’s new to me.
    Nonetheless, I’m certainly pleased I found it and I’ll
    be bookmarking it and checking back regularly!

  4. I am extremely impressed with your writing
    skills as well as with the layout on your blog. Is this a paid theme or did you modify it yourself?
    Anyway keep up the excellent quality writing, it’s rare
    to see a great blog like this one nowadays.

  5. I’d like to thank you for the efforts you have put in writing this
    blog. I really hope to see the same high-grade content by you later on as well.
    In fact, your creative writing abilities has encouraged me to get my
    very own site now 😉

  6. I was recommended this website by my cousin. I’m not sure
    whether this post is written by him as no one else know such
    detailed about my trouble. You’re incredible! Thanks!

  7. Hello there! I know this is somewhat off topic but I was wondering if you knew where I could find a captcha plugin for
    my comment form? I’m using the same blog platform as yours and I’m having problems finding one?
    Thanks a lot!

  8. Excellent weblog right here! Additionally your site so much up fast!
    What host are you using? Can I get your associate hyperlink on your host?

    I wish my website loaded up as fast as yours lol

  9. Have you ever considered about including a little bit
    more than just your articles? I mean, what you say is important and everything.
    Nevertheless just imagine if you added some great graphics or video clips to give your posts more, “pop”!

    Your content is excellent but with images and videos,
    this blog could definitely be one of the best in its field.
    Good blog!

  10. Have you ever thought about adding a little bit more than just
    your articles? I mean, what you say is fundamental and all.
    Nevertheless think about if you added some great pictures or
    videos to give your posts more, “pop”! Your content is excellent but
    with images and videos, this site could definitely be one
    of the most beneficial in its field. Superb blog!

  11. Excellent goods from you, man. I’ve be aware your
    stuff prior to and you are just too wonderful.
    I really like what you have got right here, certainly like
    what you are stating and the best way wherein you say
    it. You make it entertaining and you continue to care for to keep it sensible.
    I can not wait to read far more from you. This is actually
    a tremendous website.

  12. Pretty component of content. I simply stumbled upon your blog
    and in accession capital to claim that I acquire actually enjoyed
    account your weblog posts. Anyway I will be subscribing for your feeds and even I fulfillment you get right
    of entry to persistently fast.

  13. We are a group of volunteers and opening a new scheme in our community.

    Your web site provided us with valuable information to work on. You’ve done a formidable job and our whole
    community will be thankful to you.

  14. naturally like your website but you need to take a look at the spelling on several of your posts.

    A number of them are rife with spelling issues and I in finding it very troublesome to inform the reality nevertheless I’ll certainly come again again.

  15. Jawabannya tampaknya lebih didasarkan pada psikologi manusia daripada pada alasan logis apa pun. Karena kami ingin percaya ada cara khusus untuk ‘mengalahkan lotere’. Dan yang harus kita lakukan adalah mengungkap rahasia khusus itu.

  16. Its like you read my mind! You appear to know so much about this, like you wrote the book
    in it or something. I think that you could do with some pics
    to drive the message home a bit, but instead of that, this
    is excellent blog. A great read. I’ll certainly be back.

  17. Link exchange is nothing else except it is only placing the other
    person’s webpage link on your page at appropriate place and other person will also do
    similar in support of you.

  18. Pretty component to content. I simply stumbled upon your site and in accession capital to say that I get actually
    enjoyed account your weblog posts. Anyway I’ll be
    subscribing in your feeds or even I fulfillment
    you get entry to persistently quickly.

  19. I was curious if you ever thought of changing the layout of your blog?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with
    it better. Youve got an awful lot of text for only having one or 2 images.
    Maybe you could space it out better?

  20. Pingback: Google

Leave a Reply

Your email address will not be published.