The purpose of this blog is for knowledge sharing and connect the relevant audience who are all into Microsoft Dynamics world.
Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا
Friday, October 17, 2014
Date handling in AX 2012
Hi,
dateStartMth and dateEndMth in ax 2012
//Get day from date
dayOfMth(systemdateget())
//Get month from date
mthOfYr(systemdateget())
//Get year from date
year(systemdateget())
// Ger Ist date of the month
dateStartMth (DueDate); // If DueDate = 18\11\1989 this method returns 01\11\1989
// Get Last date of the month
dateEndMth (DueDate) // If DueDate = 18\11\1989 it returns 30\11\1989
// Get no of months between the 2 dates.
noOfMonths = intvNo(Date1, Date2, intvScale::Month);
// Get no of month between 2 dates belongs to 2 different year.
noOfMonths = intvNo(Date1, Date2, intvScale::YearMonth);
//for next month
dateLoc = nextMth(today());
//for prevous month
dateLoc=prevMth(today());
//for next year
dateLoc=nextYr(today());
//for previous year
dateLoc =preYr(today());
//4 month before
dateLoc=prevQtr(today());
//4 month after
dateLoc=nextQtr(today());
Regards,
dateStartMth and dateEndMth in ax 2012
//Get day from date
dayOfMth(systemdateget())
//Get month from date
mthOfYr(systemdateget())
//Get year from date
year(systemdateget())
// Ger Ist date of the month
dateStartMth (DueDate); // If DueDate = 18\11\1989 this method returns 01\11\1989
// Get Last date of the month
dateEndMth (DueDate) // If DueDate = 18\11\1989 it returns 30\11\1989
// Get no of months between the 2 dates.
noOfMonths = intvNo(Date1, Date2, intvScale::Month);
// Get no of month between 2 dates belongs to 2 different year.
noOfMonths = intvNo(Date1, Date2, intvScale::YearMonth);
//for next month
dateLoc = nextMth(today());
//for prevous month
dateLoc=prevMth(today());
//for next year
dateLoc=nextYr(today());
//for previous year
dateLoc =preYr(today());
//4 month before
dateLoc=prevQtr(today());
//4 month after
dateLoc=nextQtr(today());
Regards,
Free dumps for microsoft certification(prometric certification)
Hi,
Below URL takes you to the dump store.(Its non authorized page but useful).
http://www.examcollection.com/
Regards,
Below URL takes you to the dump store.(Its non authorized page but useful).
http://www.examcollection.com/
Regards,
Tuesday, October 14, 2014
String Handling in AX
Hi,
str 100 mailBody = 'Mohamed Alfasith IsmailSuban';
if(strScan(mailBody,'Suban',1,strLen(mailBody)))
// Checks the presence of the string
print strreplace(mailBody,'Suban',"Mohamed");
//Replaces the substring in main string...
//Delete the first letter in AX
strDel("Dynamic AX",1,1); // it retuns "ynamic"
subStr("Alfasith",3,5); //Returns the string 'fasit'.
strUpr("Alfaith"); // Returns the string ALFASITH
strRTrim("*AX*"); //Returns "*AX". removes the space in right end
strLTrim("*AX*"); //Returns " AX*". removes the space in left end
str mytxt = "Mohamed\nAlfasith\nIsmail"; // here \n is the new line escape sequence
print strLine(mytxt,1); // this prints only Mohamed
strLen("Fasith"); // returns 6
strRep('Ala',5); // returns AlaAlaAlaAlaAla
Regards
str 100 mailBody = 'Mohamed Alfasith IsmailSuban';
if(strScan(mailBody,'Suban',1,strLen(mailBody)))
// Checks the presence of the string
print strreplace(mailBody,'Suban',"Mohamed");
//Replaces the substring in main string...
//Delete the first letter in AX
strDel("Dynamic AX",1,1); // it retuns "ynamic"
subStr("Alfasith",3,5); //Returns the string 'fasit'.
strUpr("Alfaith"); // Returns the string ALFASITH
strRTrim("*AX*"); //Returns "*AX". removes the space in right end
strLTrim("*AX*"); //Returns " AX*". removes the space in left end
str mytxt = "Mohamed\nAlfasith\nIsmail"; // here \n is the new line escape sequence
print strLine(mytxt,1); // this prints only Mohamed
strLen("Fasith"); // returns 6
strRep('Ala',5); // returns AlaAlaAlaAlaAla
Regards
Monday, October 13, 2014
How to call datasource methods by code in AX.
Hi,
TableName_ds.object(fieldnum(TableName,FeildName)).method();
RESRentAgreementCreationTmp_ds.object(fieldnum(RESRentAgreementCreationTmp,StartDate)).modified();
Regards,
Alfasith Ismail
TableName_ds.object(fieldnum(TableName,FeildName)).method();
RESRentAgreementCreationTmp_ds.object(fieldnum(RESRentAgreementCreationTmp,StartDate)).modified();
Regards,
Alfasith Ismail
Subscribe to:
Posts (Atom)
Get a table ID in SQL / table browser - D365
Hi select ID from SysTableIdView where SysTableIdView .Name = 'CustTable' <URL>/?cmp=<CompanyID>&mi=sysTableBrowser...
-
Hi, AccountingDistribution ( accounting distribution 7452 ) AccountingDistributionEventTmp ( accounting distribution 100001 ) Accountin...
-
//< What is GUID> // GUID 16 bit large range of alphanumeric similar to RecID to treat as primary key of a table. static void CreateG...