Friday, 18 January 2013

Microsoft Dynamics AX 2012 R2 - configurationKeyStr Function


Retrieves the name of a configuration key as a string.

Function

  • str configurationKeyStr(str keyname)

Parameters

  • Parameter: keyname
  • Description: The name of the configuration key.
Use this function instead of literal text to retrieve a string that contains the configuration key name. If the key does not exist, the function generates a syntax error at compile time.

Return Value

  • The name of the configuration key.

Example

  • X++
static void configurationKeyStrExample(Args _args)
{
    str s;
    ;
    s = configurationKeyStr(AIF);
    print s;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - configurationKeyStr Function' was informative. Please feel free to leave your comments.

Friday, 11 January 2013

Microsoft Dynamics AX 2012 R2 - configurationKeyNum Function


Retrieves the ID of the specified configuration key.


Function

  • int configurationKeyNum(str keyname)


Parameters

  • Parameter: keyname
  • Description: The configuration key for which to return the ID.


Return Value

  • The ID of the specified configuration key. 


Example

  • X++
static void configurationKeyNum(Args _args)
{
    int i;
    ;
    i = configurationKeyNum(AIF);
    print i;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - configurationKeyNum Function' was informative. Please feel free to leave your comments.

Thursday, 10 January 2013

Microsoft Dynamics AX 2012 R2 - conDel Function


Removes the specified number of elements from a container.


Function

  • container conDel(container container, int start, int number)


Parameters

  • Parameter: container
  • Description: The container from which to remove elements.
 
  • Parameter: start
  • Description: The one-based position at which to start removing elements.
 
  • Parameter: number
  • Description: The number of elements to delete.
 

Return Value

  • A new container without the removed elements.


Example

  • X++
static void conDelExample(Args _args)
{
    container c = ["Hello world", 1, 3.14];
    ;
    // Deletes the first two items from the container.
    c = conDel(c, 1, 2);
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - conDel Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - classStr Function


Retrieves the name of a class as a string.


Function

  • str classStr(class class)


Parameters

  • Parameter: class
  • Description: The name of the class to return.
Use this function instead of literal text to retrieve a string that contains the class name. If the class does not exist, the function generates a syntax error at compile time.


Return Value

  • The name of the class.


Example

  • X++
static void clStrExample(Args _args)
{
    str s;
    ;
    s = classStr(Global);
    print s;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - classStr Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - classNum Function


Retrieves the ID of the specified class.


Function

  • int classNum(class class)


Parameters

  • Parameter: class
  • Description: The class for which to retrieve the ID.


Return Value

  • The ID of the specified class.


Example

  • X++
static void classNumExample(Args _args)
{
    int i;
    ;
    i = classNum(Global);
    print i;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - classNum Function' was informative. Please feel free to leave your comments.

Wednesday, 9 January 2013

Microsoft Dynamics AX 2012 R2 - classIdGet Function


Retrieves the numeric identifier (the class ID) for the class of which the object is initialized.

Function

  • int classIdGet(class object)

Parameters

  • Parameter: object
  • Description: The object for which to get the class ID.

Return Value

  • The class ID of the specified object.

Example

  • X++
static void classIdGetExample(Args _args)
{
    int i;
    WorkTimeCheck w;
    ;
    i = classIdGet(w);
    print "Class ID for object is " + int2Str(i);
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - classIdGet Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - X++ Functions


In Microsoft Dynamics AX, the X++ language provides more than 100 system functions that are not part of any class. The two types of functions are as follows:
  • Run time - functions that are executed during run time.
  • Compile time - functions that are executed during compile time.

Run Time Functions


Run time functions used for data type conversions, mathematical operations, and so on. Some common run time functions are as follows:
  • str2Int - creates an int value from a str value.
  • abs - creates a positive real value from a real value that is either positive or negative.
  • conFind - retrieves the location of an element in a container.

Call Run Time Functions from .NET
  • The logic of the X++ run time functions is also implemented in the following .NET assembly:
Microsoft.Dynamics.AX.Xpp.Support.DLL
  • Inside the previous assembly, the X++ run time functions are implemented as static methods of the following class:
Microsoft.Dynamics.AX.Xpp.PredefinedFunctions

Compile Time Functions


Compile time functions are executed early in the compile of X++ code. Most of these functions retrieve metadata about items that are in the Application Object Tree (AOT). Some common compile time functions are as follows:
  • classNum - retrieves the ID of a class.
  • classStr - verifies during compile time that a class by that name exists. This is better than discovering the error later during run time.
  • evalBuf - evaluates the input string of X++ code, and then returns the results as a string.
  • literalStr - retrieves a label ID when given the string representation of a label, such as the string "@SYS12345". For example, myLabel.exists(literalStr("@SYS12345"));.

Note: Compile time functions are sometimes called intrinsic functions.

Note: X++ compile time functions cannot be called from a .NET program.  


My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - X++ Functions' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - Intrinsic Functions

Intrinsic functions are metadata assertion functions. They take arguments that represent entities in the Application Object Tree (AOT), and validate these arguments at compile time. They have no effect at run time. Intrinsic functions are a subgroup of the X++ system functions, and typically have names ending in Num or Str, for example: classNum and formStr.

Intrinsic functions should be used wherever possible in X++ code to make the code resilient to changes to the metadata stored in the AOT.

You will get a best practice warning if you use the for identifierStr function. This is because no existence checking is carried out for identifierStr. Try to use a more specific intrinsic function if one is available.

The following list contains the intrinsic functions in MorphX.

Validation of Table Metadata

  • tableCollectionStr
  • tableFieldGroupStr
  • tablePName
  • tableNum
  • tableMethodStr
  • tableStaticMethodStr
  • tableStr

Validation of Field Metadata

  • fieldNum
  • fieldPname
  • fieldStr
    

Validation of Index Metadata

  • indexNum
  • indexStr

Validation of Data Type Metadata

  • enumCnt
  • enumNum
  • enumStr
  • extendedTypeNum
  • extendedTypeStr
  • typeId
    

Validation of Configuration Key Metadata

  • configurationKeyNum
  • configurationKeyStr

Validation of License Metadata

  • licenseCodeNum
  • licenseCodeStr

Validation of Class Metadata

  • classNum
  • classStr
  • methodStr
  • staticMethodStr

Validation of Form, Report, Query, and Menu Metadata


Where possible, use the AutoDeclaration property on controls.
  • formStr
Note: In forms, control:: controlName returns the ID of the control.
  • formControlStr
  • menuItemActionStr
  • menuItemDisplayStr
  • menuItemOutputStr
  • menuStr
  • reportStr
  • queryStr
  • queryDataSourceStr
    

Validation of Web Metadata

  • webActionItemStr
  • webDisplayContentItemStr
  • webletItemStr
  • webOutputContentItemStr
  • webpageDefStr
  • webReportStr
  • websiteDefStr
  • websiteTempStr
  • webStaticFileStr
  • webUrlItemStr
  • webWebpartStr

Other

  • identifierStr
  • literalStr
  • maxDate
  • maxInt
  • minDate
  • minInt
  • resourceStr
  • varStr

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - Intrinsic Functions' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - Functions


 Most of the functions are executed when your application runs, but some are executed earlier by the compiler.

The Global Class contains a set of methods that are generally useful throughout the application. These methods can be considered an extension to the built-in functions in the X++ language. The DateTimeUtil Class also contains methods of general use for manipulating a utcdatetime value.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - Functions' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - X++ Function Categories and their Functions


This blog lists every X++ built-in function by category.

Descriptions of Categories


The following lists only the categories of X++ functions. Each category is described. These categories help people to understand the many functions, but the categories do not represent any formal construct in Microsoft Dynamics AX.

Category: Business
Description: Functions that input financial data and calculate formulas.

Category: Compiler Verified (also named Intrinsic)
Description: Functions that have their input value verified by the compiler. If the input value is not found to match any existing object in the Application Object Tree (AOT), the compiler issues an error. The inputs to these functions must be literals, because the compiler cannot determine the value that a variable contains at run time.

Category: Container
Description: Functions that operate on the container data type of X++.

Category: Convert
Description: Functions that translate data of one type into data of another type.

Category: Date
Description: Functions that operate on the date data type.

Category: Enum
Description: Functions that operate on enum objects.

Category: Math
Description: Functions that perform mathematical calculations.

Category: Miscellaneous
Description: Functions that do not belong to any specific category.

Category: Reflection
Description: Functions that access the metadata about objects and return other metadata about them.

Category: Session
Description: Functions that change or report on the context of the current user connection.

Category: String
Description: Functions that operate on the str data type.


Categorization of X++ Functions


The following lists the X++ functions that belong in each previous category.

Category: Business
X++ function:
  • cTerm
  • ddb
  • dg
  • fv
  • idg
  • intvMax
  • intvName
  • intvNo
  • intvNorm
  • pmt
  • pt
  • pv
  • rate
  • sln
  • syd
  • term

Category: Compiler Verified (also named Intrinsic)
X++ function:
  • attributeStr
  • classNum
  • classStr
  • configurationKeyNum
  • configurationKeyStr
  • datasetStr
  • enumNum
  • enumStr
  • evalBuf
  • extendedTypeNum
  • extendedTypeStr
  • fieldNum
  • fieldPName
  • fieldStr
  • formControlStr
  • formStr
  • identifierstr
  • indexNum
  • indexStr
  • licenseCodeNum
  • licenseCodeStr
  • literalStr
  • menuItemActionStr
  • menuItemDisplayStr
  • menuItemOutputStr
  • menuStr
  • methodStr
  • perspectiveNum
  • perspectiveStr
  • queryDataSourceStr
  • queryStr
  • reportStr
  • resourceStr
  • runBuf
  • securityKeyNum
  • securityKeyStr
  • ssrsReportStr
  • staticMethodStr
  • tableCollectionStr
  • tableFieldGroupStr
  • tableMethodStr
  • tableNum
  • tablePName
  • tableStaticMethodStr
  • tableStr
  • varStr
  • webActionItemStr
  • webDisplayContentItemStr
  • webFormStr
  • webletItemStr
  • webMenuStr
  • webOutputContentItemStr
  • webPageDefStr
  • webReportStr
  • webSiteDefStr
  • webSiteTempStr
  • webStaticFileStr
  • webUrlItemStr
  • webWebpartStr
  • workflowApprovalStr
  • workflowCategoryStr
  • workflowTaskStr
  • workflowTemplateStr

Category: Container
X++ function:
  • conDel
  • conFind
  • conIns
  • conLen
  • conNull
  • conPeek
  • conPoke
   
Category: Convert
X++ function:
  • any2Enum
  • any2Date
  • any2Guid
  • any2Int
  • any2Int64
  • any2Real
  • any2Str
  • char2Num
  • Date2Num
  • Date2Str
  • Datetime2Str
  • formattedStr2Num
  • guid2Str
  • int2Str
  • int642Str
  • num2Char
  • num2Date
  • num2Str
  • str2Enum
  • str2Date
  • str2Datetime
  • str2Guid
  • str2Int
  • str2Int64
  • str2Num
  • str2Time
  • time2Str
  • uint2Str
   
Category: Date
X++ function:
  • dayName
  • dayOfMth
  • dayOfWk
  • dayOfYr
  • endMth
  • maxDate
  • mkDate
  • mthName
  • mthOfYr
  • nextMth
  • nextQtr
  • nextYr
  • prevMth
  • prevQtr
  • prevYr
  • timeNow
  • today
  • wkOfYr
  • year

Category: Enum
X++ function:
  • enum2Str
  • enumCnt

Category: Math
X++ function: 
  • abs
  • acos
  • asin
  • atan
  • corrFlagGet
  • corrFlagSet
  • cos
  • cosh
  • decRound
  • exp
  • exp10
  • frac
  • log10
  • logN
  • power
  • round
  • sin
  • sinh
  • tan
  • tanh
  • trunc
   
Category: Miscellaneous
X++ function:
  • beep
  • classIdGet
  • dimOf
  • getPrefix
  • max
  • maxInt
  • min
  • minInt
  • newGuid
  • setPrefix
  • sleep
  • systemDateget
  • systemDateset

Category: Reflection
X++ function:
  • fieldId2Name
  • fieldId2PName
  • fieldName2Id
  • indexId2Name
  • indexName2Id
  • refPrintAll
  • tableId2Name
  • tableId2PName
  • tableName2Id
  • typeOf
   
Category: Session
X++ function:
  • curExt
  • curUserId
  • getCurrentPartition
  • getCurrentPartitionRecId
  • SessionId
  • funcName
  • prmIsDefault
  • runAs
   
Category: String
X++ function:
  • match
  • strAlpha
  • strCmp
  • strColSeq
  • strDel
  • strFind
  • strFmt
  • strIns
  • strKeep
  • strLen
  • strLine
  • strLTrim
  • strLwr
  • strNFind
  • strPoke
  • strPrompt
  • strRem
  • strRep
  • strRTrim
  • strScan
  • strUpr
  • subStr

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - X++ Function Categories and their Functions' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - Functions and Macros


X++ provides str2Int and many other functions that are routinely needed for programming tasks such as the following:
  • Mathematical functions
  • Data type conversions
  • Validation of Application Object Tree (AOT) arguments

X++ also provides #define and other precompiler directives that provide a mechanism for declaring constant values and other items.


My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - Functions and Macros' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - char2Num Function


Converts a character in a string to the ASCII value of the character.


Function

  • int char2Num(str text, int position)

Parameters

  • Parameter: text
  • Description: The string that contains the character.

  • Parameter: position
  • Description: The position of the character in the string.

Return Value

  • The ASCII value of the character as an int object.

Example

  • char2Num("ABCDEFG",3); //Returns the numeric value of C, which is 67.
  • char2Num("ABCDEFG",1); //Returns the numeric value of A, which is 65.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - char2Num Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - beep Function


Emits a short sound from the speakers on the computer.


Function

  • void beep()

Example

  • X++
static void beepExample(Args _args)
{
    ;
    beep();
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - beep Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - attributeStr Function


Validates that the specified attribute class exists in the AOT; if not, a compiler error occurs.


Function

  • str classStr(class class)

Parameters

  • Parameter: class
  • Description: The name of the attribute to validate.


Return Value

  • The name of the attribute.
This function is an intrinsic function, which is a metadata assertion function. Intrinsic functions take arguments that represent entities in the Application Object Tree (AOT) and validate these arguments at compile time. They have no effect at run time.

Attributes are classes that inherit from the SysAttribute class.


Example

  • X++
static void attributeStrExample(Args _args)
{
    str s;
    ;
    s = attributeStr(AifDocumentOperationAttribute);
    print s;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - attributeStr Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - atan Function


Retrieves the arc tangent of a real number.


Function

  • real atan(real arg)

Parameters

  • Parameter: arg
  • Description: The number for which to calculate the arc tangent.

Return Value

  • The arc tangent of the specified number.

Example

  • aTan(0.36) //Returns 0.35.
  • X++
static void atanExample(Args _args)
{
    real r;
    ;

    r = atan(1.0);
    print strFmt("The Arc Tangent of 1.0 is %1", r);
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - atan Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - asin Function


Retrieves the arc sine of a real number.

Note: Argument values outside of the range –1 to 1 result in the, "Argument for trigonometric function out of range" run-time error.

Function

  • real asin(real arg)

Parameters

  • Parameter: arg
  • Description: The number for which to calculate the arc sine.

Return Value

  • The arc sine of the specified number.

Example

  • aSin(0.36) //Returns 0.37.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - asin Function' was informative. Please feel free to leave your comments.

Tuesday, 8 January 2013

Microsoft Dynamics AX 2012 R2 - any2Str Function


Converts an anytype value to a str value.


Function

  • str any2Str(anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert.
The object parameter can be of most data types, but useful output is obtained from input elements of the date, int, and enum types.


Return Value

  • A str value.

Example

  • X++
static void any2StrExample(Args _args)
{
    str myStr;
    anytype a;
    ;
  
    a = "Any to string";
    myStr = any2Str(a);
    Global::info(strFmt("%1 is output, from input of Any to string as a str value", myStr));

    a = NoYes::Yes;
    myStr = any2Str(a);
    Global::info(strFmt("%1 is output, from input of NoYes::Yes as an enumeration", myStr));


}
/****Infolog Display
Message (09:08:46 am)
Any to string is output, from input of Any to string as a str value
1 is output, from input of NoYes::Yes as an enumeration
****/

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Str Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Real Function


Converts an anytype value to a real value.


Function

  • real any2Real (anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert.
The object parameter can be of most data types, but useful output is obtained for input elements of the date, int, enum, and str types.

Return Value

  • A real value.

Example

  • X++
static void any2RealExample(Args _args)
{
   real myReal;
   str s;
   int i;
   NoYes a;
   ;

   s = "5.12";
   myReal = any2Real(s);
   Global::info(strfmt("%1 is the output from the input of 5.12 as a str object", myReal));

   i = 64;
   myReal = any2Real(i);
   Global::info(strfmt("%1 is the output from the input of 64 as an int object", myReal));

   a = NoYes::Yes;
   myReal = any2Real(a);
   Global::info(strfmt("%1 is the output from the input of NoYes::Yes as an enum object", myReal));
}
/****Infolog display.
Message (02:43:57 pm)
5.12 is the output from the input of 5.12 as a str object
64.00 is the output from the input of 64 as an int object
1.00 is the output from the input of NoYes::Yes as an enum object
****/

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Real Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Int64 Function


Converts an anytype object to an int64 object.

Function

  • int64 any2Int64(anytype object)

Parameters

  • Parameter: object
  • Description: The anytype object to convert.

Return Value

  • An int64 object.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Int64 Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Int Function


Converts an anytype value to an int value.


Function

  • int any2Int(anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert.

Return Value

  • An int value.
The object parameter can be of most data types, but useful data is only obtained by using parameters of an enum, real, or str type.

 

Example

  • X++
static void any2IntExample(Args _args)
{
    int myInt;
    str s;
    NoYes a;
    real r;
    ;

    s = "31";
    myInt = any2Int(s);
    Global::info(strfmt("%1 is the output, from input of 31 as a str value.", myInt));

    a = NoYes::No;
    myInt = any2Int(a);
    Global::info(strfmt("%1 is the output, from input of NoYes::No as an enum value.", myInt));

    r = 5.34e2;
    myInt = any2Int(r);
    Global::info(strfmt("%1 is the output, from the input of 5.34e2 as a real value.", myInt));
 }
/**** Infolog display.
Message (02:23:59 pm)
31 is the output, from input of 31 as a str value.
0 is the output, from input of NoYes::No as an enum value.
534 is the output, from the input of 5.34e2 as a real value.
****/

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Int Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Guid Function


Converts the specified anytype object to a GUID object.


Function

  • guid any2Guid(anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert to a GUID object.

Return Value

  • A GUID object.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Guid Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Enum Function


Converts an anytype value to an enum value.


Function

  • enum any2Enum (anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert.
The object parameter can be of most data types, but useful data is only obtained by using parameters of a str or int type.


Return Value

  • An enum value.

Example

  • X++
static void any2EnumExample(Args _args)
{
    NoYes a;
    int i;
    str s;
    ;

    i = 0; // An int object that will be converted
    a = any2Enum(i);
    Global::info(strfmt("%1 is the output, from input of the %2 int object.", a, i));

    s = "1"; // A str object that will be converted
    a = any2Enum(myAny);
    Global::info(strfmt("%1 is the output, from input of the %2 str object.", a, s));

}
/**** Infolog display.
Message (01:05:30 pm)
No is the output, from input of the 0 int object.
Yes is the output, from input of the 1 str object.
****/

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Enum Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - any2Date Function

Converts an anytype value to a date value.


Function

  • date any2Date (anytype object)

Parameters

  • Parameter: object
  • Description: The value to convert to a date.
The object parameter can be of most data types, but useful output is obtained when it is of the str or int type. Inappropriate content generates a run-time error.

Return Value

  • A date value.

Example

  • X++
static void any2DateExample(Args _args)
{
    date myDate;
    str s; 
    int i;
    ;

    s = "2010 6 17"; // A string object, of yyyy mm dd.
    myDate = any2Date(s);
    Global::info(strFmt("%1  is output, from input of \"2010 6 17\"", myDate));

    i = 40361; // An int object, which represents the number of days from 1900/01/01.
    myDate = any2Date(i);
    Global::info(strFmt("%1  is output, from input of 40361", myDate));
}

/**** Infolog display.
Message (04:44:15 pm)
6/17/2010 is output, from input of "2010 6 17"
7/4/2010 is output, from input of 40361
****/

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - any2Date Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - acos Function

Retrieves the arc cosine of a real number.

Note:

  • Argument values outside the –1 to 1 range generate the following run-time error, "Argument for trigonometric function out of range."

Function

  • real acos(real arg)

Parameters

  • Parameter: arg
  • Description: The number to retrieve the arc cosine of.

Return Value

  • The arc cosine of arg.

Example

  • X++
static void acosExample(Args _args)
{
    real r;
    str  s;
    ;
    r = acos(0.0);
    s = strFmt("The arc cosine of 0.0 is %1 ", r);
    print s;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - acos Function' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - abs Function

Retrieves the absolute value of a real number.

For example:

  • abs(-100.0) returns the value 100.0.
  • abs(30.56) returns the value 30.56.

Function

  • real abs(real arg)

Parameters

  • Parameter: arg
  • Description: The number to get the absolute value of.

Return Value

  • The absolute value of arg.

Example

  • X++
static void absExample(Args _args)
{
    real r1;
    real r2;
    ;

    r1 = abs(-3.14);
    r2 = abs(3.14);
    if (r1 == r2)
    {
        print "abs of values are the same";
        pause;
    }
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - abs Function' was informative. Please feel free to leave your comments.

Monday, 7 January 2013

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Licensing Framework for ISVs

What can you do?


ISVs can now query named-users license information. ISVs can use the information to apply license fees for their intellectual property.

Why is this important?


ISVs can use the same named-user licensing information that Microsoft uses. The concurrent users licensing model of Microsoft Dynamics AX 2009 is no longer available.

How was this performed in previous versions?


In Microsoft Dynamics AX 2009, ISVs applied licenses based on the concurrent users model.

In Microsoft Dynamics AX 2012, Microsoft moved away from the concurrent users model, and switched to the named-users licensing model. In Microsoft Dynamics AX 2012 R2, ISVs can use the same named-user licensing information that Microsoft uses.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Licensing Framework for ISVs' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Language-Integrated Query (LINQ) to AX, for Interop from .NET

What can you do?

In .NET Framework languages such as C#, you can use the same LINQ syntax and paradigm that you already use with LINQ to SQL.

Why is this important?


LINQ to AX makes it easier to interoperate with Microsoft Dynamics AX data from your C# program.

How was this performed in previous versions?


Without LINQ to AX, the primary way your C# program can access table data is to call the methods on a C# class that is a proxy to a table.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Language-Integrated Query (LINQ) to AX, for Interop from .NET' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Standard Document Services

What can you do?


The following services are new in Microsoft Dynamics AX 2012 R2:
  • Advanced ledger entry
  • Bank statement
  • Budget plan
  • Customer collection letters for Norway
  • Payroll earnings import
  • Worker import
  • Warehouse space utilization forecast
  • Warehouse workload capacity forecast

Why is this important?


Now you can use services to import different types of transactions, to import bank statements, to maintain budget plans, to import earnings statements from external systems, to forecast warehouse workload capacity and space utilization, and to read, create, and update worker information in the Human resources module by using external systems.

How was this performed in previous versions?


These features were not available.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Standard Document Services' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Services and Application Integration Framework (AIF)

What can you do?


AIF supports a Microsoft Dynamics AX installation that has multiple partitions. The new data partitioning feature affects the way data is accessed by service operations in Microsoft Dynamics AX. Each service request must contain the information to identify a specific partition. If you do not specify a partition in the call context or message header XML, AIF uses the default partition for the calling user.

The administration of AIF is not per-partition. That is, the administration forms provide a view of the status of the service operation infrastructure that includes inbound and outbound integration ports, the message history, and the exception log, for all partitions at the same time.

The call context, the schema for the message header, and the administration form for inbound ports have changed to enable you to restrict service requests to a specific partition.

Note:


In Microsoft Dynamics AX 2012 R2, AIF includes support for optional replacement fields for a surrogate foreign key that has multiple replacement fields. In other words, a replacement field is optional if the referring surrogate foreign key field is specified as non-mandatory on the table.

In previous versions of Microsoft Dynamics AX, AIF considered all surrogate foreign key replacement fields as mandatory.  For outbound transfers, this meant that previous versions of Dynamics AX serialized each field when sending Axd documents. Therefore, in external clients written to use outbound document services in previous versions of Microsoft Dynamics AX, fields that were previously mandatory are now optional, and may be missing from the XML message.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Services and Application Integration Framework (AIF)' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Enterprise Portal

What can you do?


A new User Control option was added called Chart Control. A Chart Control enables you to display chart data in Enterprise Portal. A Chart Control can display data from a Report Data Provider (RDP) class or from an analysis cube.

Why is this important?


A Chart Control is optimized for performance because everything needed for the chart to display is contained in the data set. The Chart Control does not need a Reporting Services server to render the chart which improves the performance.

The alternative is to use Reporting Services to render charts on Enterprise Portal pages. The performance issues become problematic when role centers have multiple charts to render.

How was this performed in previous versions?


In Microsoft Dynamics AX 2009 and Microsoft Dynamics AX 2012, you can use Visual Studio tools for Microsoft Dynamics AX to create a chart report that uses Reporting Services.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Enterprise Portal' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Client

What can you do?

When you install the Microsoft Dynamics AX client, AX32.exe registers as a COM server. You can use the Dynamics AX COM object to programmatically open a specified form. In Microsoft Dynamics AX 2012 R2, you can also specify the partition to use with the form.

You can use the API in Office Add-ins for Microsoft Dynamics AX to programmatically modify a Microsoft Excel spreadsheet or Microsoft Word document that includes data that you exported from a form. You can also use the API to lock the data that appears in an Excel spreadsheet.

Why is this important?

You use a partition with the Dynamics AX COM object to specify the business entity that includes the data that you want to appear in the form. The partition prevents the form from displaying data from other business entities.

The Office Add-ins API gives you additional flexibility to programmatically customize a spreadsheet or document file that includes Microsoft Dynamics AX data. You can use the API with a spreadsheet or document that you created by exporting data from a form. For example, you can lock a spreadsheet to prevent people from changing the data fields and records that appear in the spreadsheet.

How was this performed in previous versions?

These features were not available.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Client' was informative. Please feel free to leave your comments.

Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Partition

What can you do?

The business data in each partition is isolated from the data in all other partitions in the same installation of Microsoft Dynamics AX. Business data that is shared among companies is shared only among companies that are in the same partition.

A holding corporation that has subsidiary companies can reduce deployment and maintenance costs by hosting all the subsidiaries in one installation of Microsoft Dynamics AX. The system administrator for the holding corporation can put each subsidiary in its own partition. In this configuration, the personnel of a given subsidiary company cannot access the data of any other subsidiary.

Each Microsoft Dynamics AX client session starts in a partition. The session cannot later be switched to another partition. Instead the user must start a new session and direct it to start in a different partition, if the user is authorized for another partition. The system prevents even the system administrator from accessing data in any partition other than the current partition of the session.

Nothing additional is required to define or maintain reports in a configuration that has multiple partitions.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics AX 2012 R2 - What's New for Developers in Feature area of Partition' was informative. Please feel free to leave your comments.