Friday, January 22, 2016

FUNCTIONS IN AX 2012

static void systemFunctions(Args _args)
{
    real r;
    str s ;
    int i;
    container c = ['DAT', 'USMF', 'IBM' ];
    CustTable custtable;
    Test    test;
    Gender  g;
    ;

    //s = dayName(4);
    s = curUserId();
    info(strFmt("current user id is %1",s));
    //i = sessionId();
    //info(strFmt("session id is %1", i));
    //s = funcName();
    //info(strFmt("current extension is %1", s));
    //info(strFmt("The fourth day of this week is %1",s));
    //g = Gender::Male;
    //info(enum2str(g));
    //i=dayofyr(today());
    //i = dayofyr(systemDateGet());
    //info(strFmt("%1", i));
    //info(subStr("jagadeesh", 4,2));
    //info(strUpr("jagadeesh"));
    //info(strRep("jagadeesh", 10));
    //info(strPoke("Jagadeesh", "Vemula",5));
    //info(strLwr("JAGADEESH"));
    //info(strLTrim(     "Jagadeesh"   ));
    //print strFind("Vemula", "V",1, 5);
    //pause;
    //info(strDel("Jagadeesh",5,5));
    //r = trunc(2.414);
    //info(strFmt("%1",r));
   //while select firstOnly10 reverse crossCompany : c * from custtable
    //{
    //info(custtable.AccountNum);
    //}
    //ttsBegin;
    //while select forUpdate test
        //where test.Name == "jagadeeshVemula"
    //{
        //test.Name = "jagadeesh"+"Vemula";
        //test.Update();
        //info(test.Name);
    //}
    //ttsCommit;
    //CustTrans custtrans;
    //;
    //while select firstOnly10 reverse AccountNum from custtable order by custgroup desc
       //// join CustTrans
       //// where custtable.AccountNum == custtrans.AccountNum
    //{
        //info(strFmt("%1,%2", custtable.AccountNum , custtable.CustGroup));
    //}

   // s = strRem("MynameIs","Is");
    //s = strltrim("ABCD - EFGH") ;
   // info(s);
    //s = curUserId();
    //s = curext();
    //r = corrFlagSet(0.36, 2);
    //info(strFmt("%1",corrFlagGet(r)));
    //c+= "item2";
    //c+= "item3";
    ////c = conNull();
    ////info(strFmt("%1",conLen(c)));
    //for(i=1; i<= conLen(c); i++)
    //{
        //info(strFmt("before %1",conPeek( c, i)));
    //}

    //c = conIns(c,2, "item1");//["item1", "item2"], 1);
    ////r= acos(0.0);
    ////s= strFmt("The arc cosine of 0.0is %1", r);
    ////info(s);
    ////c = conIns(c, 1, "item1");
    ////c = conIns(c, 2, "item2");
    //
    //for(i=1; i<= conLen(c); i++)
    //{
        //info(strFmt("after %1",conPeek( c, i)));
    //}
}

No comments:

Post a Comment