Dynamics AX
4.0 Kernel Functions
Math
real abs(real figure)
real sin(real arg)
real cos(real
arg)
real tan(real arg)
real asin(real
arg)
real acos(real
arg)
real atan(real
arg)
real sinH(real
arg)
real cosH(real
arg)
real tanH(real
arg)
real exp10(real decimal)
real log10(real figure)
real exp(real arg)
real logN
(real figure)
real power(real figure1, real
figure2)
real frac(real
decimal)
real trunc(real
decimal)
real round(real figure1, real
figure2)
real decRound(real
figure, int decimals)
anytype max(anytype
figure1, anytype figure2)
anytype min(anytype
figure1, anytype figure2)
Financial
real ddb(real price, real scrap,
real life, integer period)
real sln(real
price, real scrap, real life)
real syd(real
price, real scrap, real life, int period)
real dg(real sale, real purchase)
real idg(real
purchase, real contratio)
real fv(real amount, real
interest, real life)
real pv(real
amount, real interest, real life)
real pmt(real principal, real
interest, real life)
real pt(real amount, real
percentage)
real rate(real future-value, real
current-value, real terms)
real term(real amount, real
interest, real futurevalue)
real cterm(real
interest, real future value, real current value)
Conversion
str ansi2Ascii(str ansiString)
str ascii2Ansi(str asciiString)
int any2Int(anytype
object)
int64 any2Int64(anytype object)
real any2Real(anytype
object)
str any2Str(anytype
object)
enum any2Enum(anytype
object)
date any2Date(anytype
object)
GUID any2GUID(anytype object)
int char2Num(str
text, int position)
str num2Char(int
figure)
real str2Num(str
text)
str num2Str(real number, int characters, int decimals, int separator1, int separator2)
int date2Num(date date)
date num2Date(int
days)
str int2Str(int
integer)
int str2Int(str
text)
str int642Str(int64 integer)
int64 str2Int64(str text)
str uint2Str(int
integer)
str enum2Str(enum
enum)
enum str2Enum(enum
type,str text)
str date2Str(date date, int sequence, int day, int separator1, int month, int separator2, int year)
date str2Date(str
text, int sequence)
str time2Str(int
time, int separator1, int
separator2)
int str2Time(str
text)
str GUID2Str(GUID uuid)
GUID str2GUID(str text)
Container
int conFind(container
container, anytype element,
...)
int conLen(container
container)
container conIns(container
container, int start, anytype element, ...)
container conDel(container
container, int start, int number)
container conPoke(container
container, int start, anytype element,...)
anytype conPeek(container
container, int number)
container conNull()
Date
& Time
date mkDate(int day, int month, int year)
date today()
int timeNow()
date systemDateGet()
date systemDateSet(date
date)
str dayName(int number)
str mthName(int month)
int dayOfWk(date
date)
int dayOfMth(date
date)
int dayOfYr(date
date)
int wkOfYr(date
date)
Int mthOfYr(date date)
int year(date date)
date prevMth(date
date)
date prevQtr(date
date)
date prevYr(date
date)
date nextMth(date
date)
date nextQtr(date
date)
date nextYr(date
date)
int primoYr(date
arg)
int ultimoYr(date
arg)
date endMth(date
date)
date maxDate()
date convertUTCDateToLocalDate(date
utcDate, int utcTime)
int convertUTCTimeToLocalTime(int utcTime)
int getCurrentUTCTime()
Interval
int intvMax(date
input-date,date ref-date,int
func)
str intvName(date
ref-date,int col,int func)
int intvNo(date
input-date,date ref-date,int
func)
date intvNorm(date
input-date,date ref-date,int
func)
Code
Execution
str evalBuf(expression-string)
anytype runBuf(str job, ...)
container runAs(str userId, int
classId, str staticMethodName [, container params,
str company, str language])
String
str strFmt(str string, ...)
str strPrompt(str string, int len)
str strColSeq(str text)
str literalStr(int str)
str strIns(str text1, str text2, int position)
str strPoke(str text1, str text2, int position)
str strRep(str text, int number)
str strDel(str text, int position, int number)
str strKeep(
str text1, str text2)
str strRem(str text1, str text2)
str strAlpha(str text)
str strLTrim(str text)
str strRTrim(str text)
str strUpr(str text)
str strLwr(str text)
str subStr(str text, int position, int number)
str strLine(str string, int count)
int strFind(str text, str characters, int position, int number)
int strNFind(str text, str characters, int position, int number)
int strScan(str text1, str text2, int position, int number)
int strLen(str text)
int strCmp(str text1, str text2)
int match(str
pattern, str text)
Extended
Data Type
int extendedTypeNum(str typeName)
str extendedTypeStr(str typeName)
Enum
int enumNum(enum enum)
str enumStr(enum enum)
int enumCnt(enum enumtype)
Table
int tableNum(table)
str tableStr(table)
str tablePname(table)
int fieldNum(table,
field)
str fieldStr(table,
field)
str fieldPname(table,
field)
str tableId2Name(int table-id)
str tableId2Pname(int table-id)
int tableName2Id(str table-name)
str fieldId2Name(int tableid, int
fieldid)
str fieldId2Pname(int tableid, int
fieldid)
int fieldName2Id(int tableid, str
fieldname)
str tableMethodStr(int table, int method)
str tableStaticMethodStr(int table, int method)
str tableCollectionStr(class
tableCollection)
str tableFieldgroupStr(table,
fieldGroup)
Index
int indexNum(table,
index)
str indexStr(table,
index)
str indexId2Name(int table-id, int index-id)
int indexName2Id(int table-id, str indexname)
Class
int classNum(Class)
str classStr(Class)
Int classIdGet(object)
str methodStr(class
class, int method)
str staticMethodStr(class
class, int method)
Configuration
Key
int configurationKeyNum(str keyName)
str configurationKeyStr(str keyName)
int securityKeyNum(str keyName)
str securityKeyStr(str KeyName)
int licenseCodeNum(str codeName)
str licenseCodeStr(str codeName)
Menu
& Menu Item
str menuItemActionStr(class
menuItem)
str menuItemDisplayStr(class
menuItem)
str menuItemOutputStr(class
menuItem)
str menuStr(class
menu)
Various
Object Info
str formStr(form)
str reportStr(report)
str queryStr(query)
str identifierStr(identifier
x)
str resourceStr(str resourceName)
str helpApplStr(enum type, str id)
str helpDevStr(enum type, str id)
str helpFileStr(str helpFilename)
str curExt()
str curUserId()
int sessionId()
int dimOf(anytype element)
enum typeOf(anytype object)
int typeId(type)
str
varStr(parm)
str
funcName()
int prmIsDefault(anytype any)
Web
str webFormStr(str name)
str webReportStr(str name)
str webMenuStr(str name)
str webActionItemStr(class
webActionItem)
str webDisplayContentItemStr(class
webDisplayContentItem)
str webletItemStr(class
webletItem)
str webOutputContentItemStr(class
webOutputContentItem)
str webPageDefStr(str pageName)
str webSiteDefStr(str resourceName)
str webSiteTempStr(str resourceName)
str webStaticFileStr(str pageName)
str webUrlItemStr(class
webUrlItem)
str webWebpartStr(str resourceName)
Various
void beep()
int sleep(int
integer)
int maxInt()
int minInt()
str getPrefix()
int setPrefix(str prefix)
int corrFlagGet(real
arg)
real corrFlagSet(real
real, int arg)
void refPrintAll(class
object, str filename, str
title)
GUID newGUID()