Tuesday 8 December 2020

Runtime functions for tasks IN x++ OPERATIONS

X++ runtime functions for common tasks

  • Business operations - Enter financial data and calculate financial formulas.
  • Container operations - Run functions to manipulate the container data type.
  • Conversions - Translate the data from one type to another data type.
  • Date operations - Manipulate the date data type.
  • Mathematical operations - Used to perform additional calculations.
  • Reflection operations - Access an object's metadata and return other metadata for the object.
  • Session operations - Change or report current user connection to Finance and Operations apps.
  • String operations - Like the date operations, string operations can manipulate the string data type.

Business

For more information, see X++ Business Run-Time Functions.

BUSINESS
    
cTermddbdgfV
idgintvMaxintvNameintvNo
intvNormpmtptpv
rateslnsydterm

Container

For more information, see X++ Container Run-Time Functions.

  • conDel
  • conFind
  • conIns
  • conLen
  • conNull
  • conPeek
  • conPoke

Conversion

For more information, see X++ Conversion Run-Time Functions.

CONVERSION
    
any2Dateany2Enumany2Guidany2Int
any2Int64any2Realany2Stranytodate
anytoenumanytoguidanytointanytoint64
anytorealanytostrchar2Numdate2Num
date2Strdatetime2Strenum2strguid2Str
int2Strint642Strnum2Charnum2Date
num2Strstr2Datestr2Datetimestr2Enum
str2Guidstr2Intstr2Int64str2Num
str2Timetime2Struint2Str

Date

For more information, see X++ Date Run-Time Functions.

DATE
    
dayNamedayOfMthdayOfWkdayOfYr
endMthmkDatemthNamemthOfYr
nextMthnextQtrnextYrprevMth
prevQtrprevYrsystemDateGetsystemDateSet
timeNowtodaywkOfYryear

Math

For more information, see X++ Math Run-Time Functions.

MATH
    
absacosasinatan
corrFlagGetcorrFlagSetcoscosh
decRoundexpexp10frac
log10logNmaxmin
powerroundsinsinh
tantanhtrunc

Reflection

For more information, see X++ Reflection Run-Time Functions.

REFLECTION
    
classIdGetdimOffieldId2NamefieldId2PName
fieldName2IdindexId2NameindexName2IdrefPrintAll
tableId2NametableId2PNametableName2IdtypeOf

Session

For more information, see X++ Session Run-Time Functions.

SESSION
    
curExtcurUserIdfuncNamegetCurrentPartition
getCurrentPartitionRecIdgetPrefixsessionIdprmIsDefault
runAssetPrefix

String

For more information, see X++ String Run-Time Functions.

STRING
    
matchstrAlphastrCmpstrColSeq
strDelstrFindstrFmtstrIns
strKeepstrLenstrLinestrLTrim
strLwrstrNFindstrPokestrPrompt
strRemstrRepstrRTrimstrScan
strUprsubStr

beep

Emits a short sound from the speakers on the computer.

X++
void beep()

beep example

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

newGuid

Creates a globally unique identifier (GUID).

X++
guid newGuid()

Return value

A GUID.

newGuid example

The following example creates a GUID.

X++
static void newGuidExample(Args _arg)
{
    guid myGuid;

    myGuid = newguid();
    print strfmt("The GUID is: %1", myGuid);
}

sleep

Pauses the execution of the current thread for the specified number of milliseconds.

X++
int sleep(int _duration)

Parameters

PARAMETERS
ParameterDescription
_durationThe number of milliseconds to pause.

sleep return value

The number of milliseconds that the thread actually paused.

Example

X++
static void sleepExample(Args _arg)
{
    int seconds = 10;
    int i;

    i = sleep(seconds*1000);
    print "job slept for " + int2str(i/1000) + " seconds";
}

No comments:

Post a Comment

AZURE INTERVIEW QUESTIONS AND ANSWERS

AZURE INTERVIEW QUESTIONS AND ANSWERES 2021 2. What is cloud computing? Explanation:  It is the use of servers on the internet to “store...