Codeunit 5505360 M365 Common Management
Codeunit 5505360 M365 Common Management
Methods
Min
procedure Min(a: Decimal; b: Decimal): Decimal
Returns the lower of 2 passed variables.
Parameters / Return Value
a
Decimal
Decimal
b
Decimal
Decimal
Returns
Decimal
Decimal
Min
procedure Min(a: Date; b: Date): Date
Returns the lower of 2 passed variables.
Parameters / Return Value
a
Date
Date
b
Date
Date
Returns
Date
Date
Max
procedure Max(a: Decimal; b: Decimal): Decimal
Returns the higher of 2 passed variables.
Parameters / Return Value
a
Decimal
Decimal
b
Decimal
Decimal
Returns
Decimal
Decimal
Max
procedure Max(a: Date; b: Date): Date
Returns the higher of 2 passed variables.
Parameters / Return Value
a
Date
Date
b
Date
Date
Returns
Date
Date
IsBitSet
procedure IsBitSet(bits: Integer; bit: Integer): Boolean
Tests if bit is set in bits.
Parameters / Return Value
bits
Integer
Integer
bit
Integer
Integer
Returns
Boolean
Boolean
BitPow
procedure BitPow(pow: Integer): Integer
Returns a number which is the pow’s power of 2.
Parameters / Return Value
pow
Integer
Integer
Returns
Integer
Integer
LeftPadStr
procedure LeftPadStr(string: Variant; length: Integer; padChar: Char): Text
Left pad a variant/string to a full length of length using padding character padchar.
Parameters / Return Value
string
Variant
Variant
length
Integer
Integer
padChar
Char
Char
Returns
Text[]
Text
LeftPadNumber
procedure LeftPadNumber(string: Variant; length: Integer): Text
Left pad a variant/string to a full length of length using padding character ‘0’.
Parameters / Return Value
string
Variant
Variant
length
Integer
Integer
Returns
Text[]
Text
RightStrPos
procedure RightStrPos(fromText: Text; charToFind: Char): Integer
Returns the position of the character to find, counted from the right.
Parameters / Return Value
fromText
Text[]
Text
charToFind
Char
Char
Returns
Integer
Integer
TextDifference
procedure TextDifference(a: Text; b: Text): Integer
Returns the Text difference of two strings as Integer.
Parameters / Return Value
a
Text[]
Text
b
Text[]
Text
Returns
Integer
Integer
RegexMatchGroups
procedure RegexMatchGroups(input: Text; pattern: Text; var returnGroups: Record Groups): Boolean
Returns a regex group collection for a pattern match.
Parameters / Return Value
input
Text[]
Text
pattern
Text[]
Text
returnGroups
Record "Groups"
Record Groups
Returns
Boolean
Boolean
SingleRegexMatch
procedure SingleRegexMatch(input: Text; pattern: Text): Text
Return a single Regular Expression match based on input and regex-pattern.
Parameters / Return Value
input
Text[]
Text
pattern
Text[]
Text
Returns
Text[]
Text
ToTitleCase
procedure ToTitleCase(textToTitle: Text): Text
Convert a string to Title Case (ignores any non letter characters).
Parameters / Return Value
textToTitle
Text[]
Text
Returns
Text[]
Text
ToPascalCase
procedure ToPascalCase(textToPascal: Text): Text
Convert a string to Pascal Case (see https://en.wikipedia.org/wiki/Pascal_case).
Parameters / Return Value
textToPascal
Text[]
Text
Returns
Text[]
Text
ToCamelCase
procedure ToCamelCase(textToCamel: Text): Text
Convert a string to Camel Case (see https://en.wikipedia.org/wiki/Camel_case).
Parameters / Return Value
textToCamel
Text[]
Text
Returns
Text[]
Text
CrLf
procedure CrLf(): Text[2]
Returns a text containing Windows CR/LF charcters.
Parameters / Return Value
Returns
Text[2]
Text[2]
GetFileFilter
procedure GetFileFilter(typeName: Text; fileExtensions: List of [Text]): Text
Returns a file dialog filter text.
Parameters / Return Value
typeName
Text[]
Text. A human readable name for the file type.
fileExtensions
List[Text]
List of [Text]. A list of file extensions to be used.
Returns
Text[]
Return value of type Text. A dialog filter text.
GetFileFilter
procedure GetFileFilter(typeName: Text; fileExtensions: Text): Text
Returns a file dialog filter text.
Parameters / Return Value
typeName
Text[]
Text. A human readable name for the file type.
fileExtensions
Text[]
Text. A comma or semicolon delimited list of file extensions to be used.
Returns
Text[]
Return value of type Text. A dialog filter text.
GetNextUniqueNumber
procedure GetNextUniqueNumber(): BigInteger
Returns a company-wide unique number.
Parameters / Return Value
Returns
BigInteger
BigInteger
GetNexUniqueCode
procedure GetNexUniqueCode(length: Integer): Code[40]
Returns a company-wide unique code of the specified length. The function internally uses the SQL Server feature AutoIncrement
Parameters / Return Value
length
Integer
Integer
Returns
Code[40]
Code[40]
GetNumberOfOptions
procedure GetNumberOfOptions(optionString: Text): Integer
Returns the number of options contained in a string. Options are usually comma separated words or phrases.
Parameters / Return Value
optionString
Text[]
Text
Returns
Integer
Integer
GetNextTextPart
procedure GetNextTextPart(var separatedText: Text; var returnPart: Text): Boolean
Given a separated text (option like) separatedText, this function returns one part/option per call in returnPart.
Parameters / Return Value
separatedText
Text[]
Text
returnPart
Text[]
Text
Returns
Boolean
Boolean
GetNextTextPart
procedure GetNextTextPart(var separatedText: Text; separator: Text; var returnPart: Text): Boolean
Given a separated text separatedText separated by separator, this function returns one part per call in returnPart.
Parameters / Return Value
separatedText
Text[]
Text
separator
Text[]
Text
returnPart
Text[]
Text
Returns
Boolean
Boolean
GetSeparatedTextAsNameValueBuffer
procedure GetSeparatedTextAsNameValueBuffer(separatedText: Text; var tempNameValueBuffer: Record "Name/Value Buffer" temporary): Boolean
Returns a temporary Name/Value Buffer table, filled with the option/separated text names while the ID field contains the actual option number/position of the text part.
Parameters / Return Value
separatedText
Text[]
Text
tempNameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
Returns
Boolean
Boolean
LookupValueFromSeparatedText
procedure LookupValueFromSeparatedText(separatedText: Text; var returnId: Integer; var returnValue: Text): Boolean
Given a comma separated text, this procedure opens a lookup page for selection and returns the selected part and its value.
Parameters / Return Value
separatedText
Text[]
Text
returnId
Integer
Integer - The 0 based index number of the entry
returnValue
Text[]
Text
Returns
Boolean
Boolean
LookupNameValueBuffer
procedure LookupNameValueBuffer(var nameValueBuffer: Record "Name/Value Buffer" temporary; placeOnName: Text; var returnId: Integer; var returnName: Text; var returnValue: Text): Boolean
Lookup a line in a Name/Value buffer.
Parameters / Return Value
nameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
placeOnName
Text[]
Text
returnId
Integer
Integer
returnName
Text[]
Text
returnValue
Text[]
Text
Returns
Boolean
Boolean
LookupNameValueBuffer
procedure LookupNameValueBuffer(var nameValueBuffer: Record "Name/Value Buffer" temporary; placeOnName: Text; var returnName: Text; var returnValue: Text): Boolean
Lookup a line in a Name/Value buffer.
Parameters / Return Value
nameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
placeOnName
Text[]
Text
returnName
Text[]
Text
returnValue
Text[]
Text
Returns
Boolean
Boolean
LookupNameValueBuffer
procedure LookupNameValueBuffer(var nameValueBuffer: Record "Name/Value Buffer" temporary; placeOnName: Text; var returnName: Text; var returnId: Integer): Boolean
Lookup a line in a Name/Value buffer.
Parameters / Return Value
nameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
placeOnName
Text[]
Text
returnName
Text[]
Text
returnId
Integer
Integer
Returns
Boolean
Boolean
GetParametersAsNameValueBuffer
procedure GetParametersAsNameValueBuffer(parameterString: Text; var tempParameterNameValueBuffer: Record "Name/Value Buffer" temporary): Boolean
Returns a temporary Name/Value Buffer table, filled with the parameter names and values while the ID field contains the actual option number.
Parameters / Return Value
parameterString
Text[]
Text
tempParameterNameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
Returns
Boolean
Boolean
GetParameterValueFromNameValueBuffer
procedure GetParameterValueFromNameValueBuffer(parameterName: Text; var tempParameterNameValueBuffer: Record "Name/Value Buffer" temporary; var parameterValue: Text): Boolean
Returns the value from a Name/Value Buffer table, matching the passed parameter name.
Parameters / Return Value
parameterName
Text[]
Text
tempParameterNameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
parameterValue
Text[]
Text
Returns
Boolean
Boolean
GetParameterValue
procedure GetParameterValue(parameterString: Text; parameterName: Text; var returnedParameterValue: Text): Boolean
Given parameterString and parameterName, this procedure returns the corresponding parameter value in returnedParameterValue.
Parameters / Return Value
parameterString
Text[]
Text
parameterName
Text[]
Text
returnedParameterValue
Text[]
Text
Returns
Boolean
Boolean
RequestPassword
Obsolete
Pending: Replaced by RequestPassword with SecretText data type for returnPassword (24.0)procedure RequestPassword(confirmPassword: Boolean; var returnPassword: Text): Boolean
Request to enter a password. If confirmPassword is true, then the dialog has an additional confirmation field and both passwords are compared and checked for complexity.
Parameters / Return Value
confirmPassword
Boolean
Boolean
returnPassword
Text[]
Text
Returns
Boolean
Boolean
RequestPassword
procedure RequestPassword(confirmPassword: Boolean; var returnPassword: SecretText): Boolean
Request to enter a password. If confirmPassword is true, then the dialog has an additional confirmation field and both passwords are compared and checked for complexity.
Parameters / Return Value
confirmPassword
Boolean
Boolean
returnPassword
SecretText
SecretText
Returns
Boolean
Boolean
RemoveIllegalPathCharacters
procedure RemoveIllegalPathCharacters(path: Text): Text
Returns a cleaned path without illegal characters.
Parameters / Return Value
path
Text[]
Text
Returns
Text[]
Text
ContainsIllegalPathCharacters
procedure ContainsIllegalPathCharacters(path: Text; raiseError: Boolean): Boolean
Returns true or raises an error, if the path contains characters not allowed in a path expression.
Parameters / Return Value
path
Text[]
Text
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
ContainsDirectorySeparatorCharacters
procedure ContainsDirectorySeparatorCharacters(path: Text; raiseError: Boolean): Boolean
Returns true or raises an error, if the path contains characters used as directory separator characters.
Parameters / Return Value
path
Text[]
Text
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
IsPathRooted
procedure IsPathRooted(path: Text; raiseError: Boolean): Boolean
Returns true or raises an error, if the path is rooted (i.e. starts with ‘' or ‘/').
Parameters / Return Value
path
Text[]
Text
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
CombinePath
procedure CombinePath(path: Text; additionalPath: Text): Text
.NET independent version of fileMgt.PathCombine(). File access may not be allowed, but propery path formatting is needed sometimes.
Parameters / Return Value
path
Text[]
Text
additionalPath
Text[]
Text
Returns
Text[]
Text
TypeNameFromVariant
procedure TypeNameFromVariant(variable: Variant): Text
Returns the text representation of a variant type.
Parameters / Return Value
variable
Variant
Variant
Returns
Text[]
Text
TrySetGlobalLanguage
procedure TrySetGlobalLanguage(languageId: Integer)
Function for setting the global language. The language is saved and can be restored by RestoreGlobalLanguage().
Parameters / Return Value
languageId
Integer
Integer
TrySetGlobalLanguageToEnglishUnitedStates
procedure TrySetGlobalLanguageToEnglishUnitedStates()
Function for setting the global language to English (United States), en-US, 1033. The language is saved and can be restored by RestoreGlobalLanguage().
TrySetGlobalLanguage
procedure TrySetGlobalLanguage(languageCode: Code[10])
Function for setting the global language. The language is saved and can be restored by RestoreGlobalLanguage().
Parameters / Return Value
languageCode
Code[10]
Code[10]
RestoreGlobalLanguage
procedure RestoreGlobalLanguage()
Restore the GlobalLanguage if it was changed by TrySetGlobalLanguage().
TryGetCultureName
procedure TryGetCultureName(cultureId: Integer; var cultureName: Text)
Try to get the culture name for the passed culture id.
Parameters / Return Value
cultureId
Integer
Integer
cultureName
Text[]
Text
UserId
procedure UserId(): Code[50]
Returns the UserId() limited to Code[50].
Parameters / Return Value
Returns
Code[50]
Code[50]
CompanyName
procedure CompanyName(): Text[30]
Returns the CompanyName() limited to Text[30].
Parameters / Return Value
Returns
Text[30]
Text[30]
CompanyDisplayName
procedure CompanyDisplayName(): Text[250]
Returns the CompanyProperty.DisplayName() limited to Text[250].
Parameters / Return Value
Returns
Text[250]
Text[250]
NullGuid
procedure NullGuid(): Guid
Returns a Null Guid.
Parameters / Return Value
Returns
Guid
Guid: Empty Null Guid
VersionToMajorMinor
procedure VersionToMajorMinor(versionText: Text): Text
Returns a converted version string reduced to major and minor version.
Parameters / Return Value
versionText
Text[]
Text
Returns
Text[]
Text
VersionToNumber
procedure VersionToNumber(versionText: Text): Integer
Returns the number representation of a version string, reduced to major/minor. “14.0.12345.0” will be reduced to “14.0” and returned as number 140.
Parameters / Return Value
versionText
Text[]
Text
Returns
Integer
Integer
GetModuleInfo
procedure GetModuleInfo(appId: Guid): ModuleInfo
Returns the ModuleInfo for the provided App ID. This function can be used inline.
Parameters / Return Value
appId
Guid
Guid
Returns
ModuleInfo
ModuleInfo
VersionToVersionString
procedure VersionToVersionString(ver: Version): Text
Returns a string representing the provided version in the format
“
Parameters / Return Value
ver
Version
Version
Returns
Text[]
Text
FullAppName
procedure FullAppName(appInfo: ModuleInfo): Text
Returns a string representing the full name of an application in the following form:
“
Parameters / Return Value
appInfo
ModuleInfo
ModuleInfo
Returns
Text[]
Text
FullAppName
procedure FullAppName(appId: Guid): Text
Returns a string representing the full name of an application in the following form:
“
Parameters / Return Value
appId
Guid
Guid
Returns
Text[]
Text
ApplicationCumulativeUpdate
procedure ApplicationCumulativeUpdate(): Text
Returns a version string representing the major and cumulative update version (i.e. 14.1).
Parameters / Return Value
Returns
Text[]
Text
ApplicationCumulativeUpdateNumber
procedure ApplicationCumulativeUpdateNumber(): Integer
Returns a number representing the major and cumulative update version (i.e. 141).
Parameters / Return Value
Returns
Integer
Integer
ApplicationBuild
procedure ApplicationBuild(): Text
Returns the application build string based on cumulative update number.
Parameters / Return Value
Returns
Text[]
Text
PlatformBuild
procedure PlatformBuild(): Text
Returns the platform build string based on cumulative update number.
Parameters / Return Value
Returns
Text[]
Text
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.