Showing posts with label 2009. Show all posts
Showing posts with label 2009. Show all posts

Wednesday, April 4, 2018

Get next Month in x++

 

How to get next month date in x++

 static void mthName(Args _arg)
{
      Transdate s; ;

      s = nextMth(today());
   print "next month date is " + s;
 
   pause;
} 
 
Happy Daxing! 
 

Monday, April 2, 2018

How to get month Number in x++

How to get month of year in x++

 
static void mthYear(Args _arg)
{
    int s;
    ;
     s = mthOfYr(today());  
    print "Month of year is " + s;
 
    pause;
}

Tuesday, June 27, 2017

Run code based on configuration key in dynamics AX 2012

Sometimes you need to run code based on your configuration keys 

Code:


  if  (isConfigurationKeyEnabled (configurationkeynum(keyname)))
   {
                     // Code goes here..
   }
   else
   {
                // do something else
    }



Happing daxing

Wednesday, April 12, 2017

Get current worker

Get current login worker:

HcmWorkerRecId workerRecId;
workerRecId = DirPersonUser::currentWorker();

Please note that it will return recid