Class SY_Session

Inherits

SY_Constant, SY_Password

Properties

LOCAL cPvxWinVersion$="pvxwin32"  

[string] indicates 32 or 64 pvxwin version based on Is64 Property. Defaults to 32

LOCAL cModuleFilter=10000000  
LOCAL cWorkstationParam$="lastcompany$|currentprinter$|inperiodend$|periodendprinter$|terminalID$"  
LOCAL cDefaultUser$="0000000000"  
LOCAL cAdministrator$="Administrator"  
LOCAL cBestDevCode$="000"  
LOCAL cPRPrefix$="PR"  
LOCAL cSelfServiceUserLogon$="_ExternalSelfServ"  

[string] The external self service user logon.

PROPERTY AUCParentCustomerFilter$  

[Property, string] Parent Auto-Complete filter details of Customer

PROPERTY AUCParentVendorFilter$  

[Property, string] Parent Auto-Complete filter details of Vendor

PROPERTY AUCParentItemFilter$  

[Property, string] Parent Auto-Complete filter details of Item

PROPERTY AUCChildCustomerFilter$  

[Property, string] Child Auto-Complete filter details of Customer

PROPERTY AUCChildVendorFilter$  

[Property, string] Child Auto-Complete filter details of Vendor

PROPERTY AUCChildItemFilter$  

[Property, string] Child Auto-Complete filter details of Item

PROPERTY AUCFilterCustomerOld$  

[Property, string] Old Auto-Complete filter of Customer

PROPERTY AUCFilterVendorOld$  

[Property, string] Old Auto-Complete filter of Vendor

PROPERTY AUCFilterItemOld$  

[Property, string] Old Auto-Complete filter of Item

PROPERTY Caption$   * Read Only *
PROPERTY CheckUserOnly   * Read Only *

[Property, numeric] Flag to only validate user

PROPERTY Edition$ SET ERR ! Specific edition name of product including Standard, Advanced or Premium   * Read Only *
PROPERTY ProductName$   * Read Only *
PROPERTY ProductId$   * Read Only *
PROPERTY ReleaseVersion$   * Read Only *
PROPERTY PathCompany$   * Read Only *
PROPERTY PathUser$   * Read Only *
PROPERTY PathSystem$   * Read Only *
PROPERTY PathHome$   * Read Only *
PROPERTY PathBase$   * Read Only *
PROPERTY PathRoot$   * Read Only *
PROPERTY PathCSRoot$   * Read Only *
PROPERTY PathData$   * Read Only *

[Property, string] Path to the data files

PROPERTY PathOCUData$  

[Property, string] Path the OCU data files

PROPERTY PathHelp$   * Read Only *
PROPERTY PathDictionary$   * Read Only *
PROPERTY PathPayroll$   * Read Only *
PROPERTY PathReports$   * Read Only *
PROPERTY PathBIEViews$   * Read Only *
PROPERTY PathImages$   * Read Only *
PROPERTY PathCsCompany$   * Read Only *
PROPERTY PathCsPayroll$   * Read Only *
PROPERTY PathOfficeTemplates$   * Read Only *

[Property, string] Path to the Office Templates direcotry

PROPERTY PathTextOut$   * Read Only *

[Property, string] Path to the TextOut directory

PROPERTY PathHTMLOut$   * Read Only *

[Property, string] Path to the HTMLOut directory

PROPERTY PathArchive$   * Read Only *
PROPERTY PathLogFiles$   * Read Only *
PROPERTY RootPrefix$   * Read Only *
PROPERTY FileSuffix$   * Read Only *
PROPERTY CompanyKey$   * Read Only *
PROPERTY CompanyCode$   * Read Only *
PROPERTY CompanyName$   * Read Only *
PROPERTY CompanyType$   * Read Only *

[string] Company Type of currently selected company. This will be "L"ive, "A"rchive, "D"emo, "T"est

PROPERTY NoCompanyDatabase   * Read Only *
PROPERTY CompanyList$   * Read Only *
PROPERTY CompanyListExternal$   * Read Only *
PROPERTY CompanyCodeList$   * Read Only *
PROPERTY CompanyPaths$   * Read Only *
PROPERTY CompanyPRPaths$   * Read Only *
PROPERTY CompanyCsPaths$   * Read Only *
PROPERTY CompanyCsPRPaths$   * Read Only *
PROPERTY CompanyKeyList$   * Read Only *
PROPERTY EnableBackClr$   * Read Only *
PROPERTY CompBackClrRed   * Read Only *
PROPERTY CompBackClrGreen   * Read Only *
PROPERTY CompBackClrBlue   * Read Only *
PROPERTY UserKey$   * Read Only *
PROPERTY UserCode$   * Read Only *
PROPERTY UserName$   * Read Only *
PROPERTY UserList$   * Read Only *
PROPERTY UserCodeList$   * Read Only *
PROPERTY UserGroupList$   * Read Only *
PROPERTY UserGroupCodeList$   * Read Only *
PROPERTY Initialized   * Read Only *
PROPERTY ModuleName$   * Read Only *
PROPERTY ModuleCode$   * Read Only *
PROPERTY ModuleLevel   * Read Only *
PROPERTY ModuleDate$  
PROPERTY ModuleEverest   * Read Only *
PROPERTY ModNoRegistration$   * Read Only *
PROPERTY ModNoTrialPeriod$   * Read Only *
PROPERTY ModNoCompany$   * Read Only *
PROPERTY ModRelationalDb$   * Read Only *
PROPERTY SystemDate$   * Read Only *
PROPERTY StartProgram$   * Read Only *
PROPERTY StartProgramName$   * Read Only *
PROPERTY StartTask   * Read Only *
PROPERTY StartArguments$   * Read Only *
PROPERTY StartIni$   * Read Only *
PROPERTY LauncherHwnd  
PROPERTY LauncherObj   * Read Only *
PROPERTY Updating  
PROPERTY SessionID$   * Read Only *
PROPERTY RegisteredName$   * Read Only *
PROPERTY TerminalServer   * Read Only *
PROPERTY WorkstationName$   * Read Only *
PROPERTY LegacyTerm$   * Read Only *
PROPERTY TerminalNo   * Read Only *
PROPERTY CurrentPID   * Read Only *
PROPERTY DateChanged$   * Read Only *
PROPERTY RegistrationCheck$   * Read Only *
PROPERTY LegacyYRec$   * Read Only *
PROPERTY DeveloperCode$   * Read Only *
PROPERTY DevelopmentSystem   * Read Only *
PROPERTY SessionCounter$   * Read Only *
PROPERTY EscapeTrap  
PROPERTY ObjectInterface   * Read Only *
PROPERTY LastOpenFileName$   * Read Only *
PROPERTY OfficeProgName$  
PROPERTY CSHostName$   * Read Only *
PROPERTY CSHostIP$   * Read Only *
PROPERTY WindowText$   * Read Only *
PROPERTY ReportDesigner$   * Read Only *
PROPERTY ReportDesignerVer$   * Read Only *
PROPERTY InstallEnvironment$   * Read Only *

[string] This 1 character string variable contains the install environment for Sage 100. "P" = Sage Provisioning Portal. This comes from an option set in SY_System:InstallEnvironment$

PROPERTY SessionFilesOpen   * Read Only *

[Property, boolean] true indicates session files are open in the current instance of SY_Session.

PROPERTY SessionFileList$   * Read Only *

[Property, string] List of session files opened by SY_Session.

PROPERTY ScriptObject   * Read Only *
PROPERTY Is64   * Read Only *

[Boolean] Indicates that this is a 64 bit environment.

PROPERTY SQL   * Read Only *
PROPERTY Hosted   * Read Only *

[Boolean] Hosted property should never be set to anything but zero as this is a deprecated flag

PROPERTY Online   * Read Only *

[Boolean] Indicates that this is a Sage 100 online installation.

PROPERTY Crypto   * Read Only *
PROPERTY CS   * Read Only *
PROPERTY RWC   * Read Only *

[Boolean] Will be set to true when client is set as RWC (Rich-Web-Client) when the Providex TCB(192) = 2. Set in the ON_CREATE

PROPERTY UI   * Read Only *
PROPERTY JavX   * Read Only *
PROPERTY Wdx$   * Read Only *
PROPERTY Security   * Read Only *
PROPERTY FileObj   * Read Only *
PROPERTY ActLogObj   * Read Only *
PROPERTY WinAPI   * Read Only *
PROPERTY WebEngine   * Read Only *
PROPERTY CharacterProgram  
PROPERTY ExternalAccess   * Read Only *
PROPERTY ExpirationDate$   * Read Only *
PROPERTY CRMUser$  
PROPERTY EverestList$   * Read Only *
PROPERTY ServiceCacheEnabled  
PROPERTY NoServerAccess  

[Boolean] Will be set to true when the client workstation has been installed with NO ACCESS

PROPERTY PEP   * Read Only *
PROPERTY SupportText$   * Read Only *

To display "Customer Support Representative"

PROPERTY SYSBuildNumber   * Read Only *

[Numeric] Sage 100 Library Master Build Number

PROPERTY Theme   * Read Only *

[Object handle] SY_Theme object for current active UI theme

PROPERTY TrackTableLock$   * Read Only *

[string] String Y/N flag to indicate whether to track information about table locking

PROPERTY TrackRecordLock$   * Read Only *

[string] String Y/N flag to indicate whether to track information about record locking within data entry

PROPERTY LauncherVersion   * Read Only *
PROPERTY IsSubscription   * Read Only *
PROPERTY RoleKeyForTask$   * Read Only *

Role key used allowing access to task, first role with full rights or first roll with read rights

Methods

FUNCTION ActiveUsers()  
FUNCTION AddPropertyValue(name$, value$, devCode$)  
FUNCTION AddPropertyValue(name$, value$)  
FUNCTION AddSurrogate$(file$, field$)  
FUNCTION AllCompaniesExpanded(modCode$, col$)  
FUNCTION ApplicationInstalled(application$)  
FUNCTION BuildTerm(term$, sysOptions$)  
FUNCTION ChangeKEK(keyPhrase$)  
FUNCTION CheckCompanyAccess(arg.userLogon$, arg.companyCode$, externalAccess)  

Checks if a user has at least one active role assigned to the company.

ParameterDescription
arg.userLogon$ [input, string] Sage 100 User logon name.
arg.companyCode$ [input, string] Sage 100 Company code.
externalAccess [input, bool] Optional flag to restrict result to only include companies that allow external access.
Returns [bool] isTRUE if the user has one or more active roles assigned to the company, otherwise isFALSE.
FUNCTION CheckForConversion()  
FUNCTION CheckForConversion(compCode$)  
FUNCTION CheckForExit()  
FUNCTION CheckForLauncher()  
FUNCTION CheckForProgram(programName$)  
FUNCTION CheckForProgram(programName$, programPath$)  
FUNCTION CheckForRequiredModules(module$)  
FUNCTION CheckForTask(taskKey)  
FUNCTION CheckMeteringRecords()  
FUNCTION CheckOfficeAccess$(arg.userLogon$, arg.companyCode$, arg.taskList$)  
FUNCTION CheckOfficeAccess$(arg.userLogon$, arg.companyCode$)  
FUNCTION CheckOfficeAccess$(arg.userLogon$)  
FUNCTION CheckOfficeAccess$()  

Returns a list of companies, or specific company, that allows external access, and the user can access through a list of task/program names (Sage 100 role security / menu selections).

ParameterDescription
arg.userLogon$ [input, string] Optional. Sage 100 User logon name. Defaults to current user.
arg.companyCode$ [input, string] Optional Company code. Default is all companies.
arg.taskList$ [input, string] Optional list of task/program names. Defaults to Office 365 required tasks.
Returns [string] List of companies with access level (R/RW), or null if no access.
FUNCTION CheckRestrictedMode()  
FUNCTION CheckRestrictedMode(user$)  

Checks to see if the given user can access the system if restricted mode is on. If restricted mode is not turned on then this will always pass. If no user passed in will use the user logon of the currently logged in user.

ParameterDescription
user$ {optional} [input, string] The User Logon to verify if they have access to Sage 100 when restricted mode is turned on.
Returns [boolean]
ValueDescription
True (1) - if given user is allowed to login when Sage 100 is set into Restricted Mode, or if Restricted Mode is not turned on.
False(0) - if user is not on file or is not allowed to log into Sage 100 when Restricted Mode is turned on.
FUNCTION CheckSecurity(taskID)  
FUNCTION CheckSecurity(taskID, securityAccess)  
FUNCTION CheckSecurityEvent(event$)  
FUNCTION CheckSecurityEvent(event$, userCode$)  
FUNCTION CheckSecurityEvent(event$, userLogon$, pswd$)  
FUNCTION CheckSecurityEvent(event$, userLogon$, pswd$, modCode$)  
FUNCTION CheckSecurityEvent(event$, uiObject, message$)  
FUNCTION CheckSecurityEvent(event$, uiObject, message$, uiDisplayed)  
FUNCTION CheckSubscriptionPlan()  
FUNCTION CheckUser(name$, pswd$)  

To validate user & password without actually changing user

ParameterDescription
name$ [input, string] User's logon code
pswd$ [input, string] user's logon password
Returns [boolean] True if no errors were encountered.
FUNCTION CheckValidPassword()  
FUNCTION Cleanup()  
FUNCTION ClearCompany()  
FUNCTION CloseSessionFiles()  
FUNCTION CloseTask(in.WorkstationName$, in.UserDispValue$, in.CompanyCode$, in.ModuleCode$, in.TaskName$, in.SessionHwnd, in.SessionPID, in.ForceClose, in.TriggerCode)  

Close workstation task

ParameterDescription
in.WorkstationName$ Name of workstation where task is to be closed (killed)
in.UserDispValue$ Display value for user associated with the task to be closed
in.CompanyCode$ Company code of task to be closed
in.ModuleCode$ Module code of task to be closed
in.TaskName$ Task name of task to be closed
in.SessionHwnd Session window handle of task to be closed
in.SessionPID Session ID of task to be closed
in.ForceClose option to force clos eof task of close message fails
in.TriggerCode Code used to identify the trigger for closing task
Returns [boolean] True = success, False = failure
FUNCTION CopyParameters(module$)  
FUNCTION CreateConsoleRec(taskKey)  
FUNCTION CreateLock(progName$)  
FUNCTION CreateLock(progName$, lockState)  
FUNCTION CreateLock(progName$, lockState, lockSys)  
FUNCTION CreateLockCheck(table$)  
FUNCTION CreateLockCheck(table$, progName$)  
FUNCTION CreateSecurity(taskID)  
FUNCTION CreateSecurity(taskID, noDrop)  
FUNCTION CreateTable(fileName$, path$)  
FUNCTION CreateTable(fileName$, path$, localFile)  
FUNCTION CreateTable(fileName$, path$, localFile, dictionary$)  
FUNCTION CreateTable(fileName$, path$, localFile, dictionary$, createPVX)  
FUNCTION CreateTable(fileName$, path$, localFile, dictionary$, createPVX, applyConstraints)  
FUNCTION CreateWorkstationRec()  
FUNCTION CreateWorkTable(filename$)  
FUNCTION CreateWorkTable(filename$, sysFlag)  
FUNCTION CreateWorkTable(filename$, sysFlag, extension$)  
FUNCTION CreateWorkTable(filename$, sysFlag, extension$, workTableName$)  
FUNCTION CreateWorkTable(filename$, sysFlag, extension$, workTableName$, applyConstraints)  
FUNCTION DisplayModuleEULA()  

Display module EULA if it has not already been displayed

Returns retSUCCESS(1)
FUNCTION DisplayServiceNotificationWarning(serviceCode$)  

Display Service Notification Warning

Returns retSUCCESS(1)
FUNCTION DropCOMObject(className$)  
FUNCTION DropFileObj()  

Drop the File Object.

FUNCTION DropObject(objectID)  
FUNCTION DropObject(className$)  
FUNCTION DropObject(className$, tableName$)  
FUNCTION DropTable(fileName$, path$)  
FUNCTION DropTable(fileName$, path$, wdxFlag)  
FUNCTION DropTable(fileName$, path$, wdxFlag, ddfTableName$)  
FUNCTION DropTable(fileName$, path$, wdxFlag, ddfTableName$, dropPVX)  
FUNCTION DropTermRecord()  
FUNCTION FindPrinterOnClause(printer$)  
FUNCTION FormatDate(rawDate$, formattedDate$, mask$)  
FUNCTION FormatDate(rawDate$, formattedDate$)  
FUNCTION FormatDate$(rawDate$)  
FUNCTION FormatDate$(rawDate$, mask$)  
FUNCTION FormatDate$(rawDate$, useDay)  
FUNCTION GetAutoUpdateInfo(paramList$)  
FUNCTION GetBuildNumber()  
FUNCTION GetCalendarMonthEnd(rawDate$, monthEnd$)  
FUNCTION GetCOMObject(className$)  
FUNCTION GetCompanyDirectories(company$, mainPath$, prPath$)  
FUNCTION GetCompanyDirectories(company$, mainPath$, prPath$, useCsPaths)  
FUNCTION GetCompanyKey$(compCode$)  
FUNCTION GetCompanyList(compList$)  
FUNCTION GetCompanyType$(compCode$)  

Return the company type for the given company code.

ParameterDescription
compCode$ [input, string] Company code for which to return the company type
Returns [return string] returns the company type for the given company code.
FUNCTION GetCustomizations(table$, context$, source$, colsSource$, colsDest$)  
FUNCTION GetCustomizations(table$, context$, source$, colsSource$, colsDest$, expSource$, expDest$)  
FUNCTION GetDate(modCode$, date$)  
FUNCTION GetDotNet(className$)  

Creates an instance of a dot net class using the common, internal Common Language Runtime.

ParameterDescription
className$ [input, string] The name of the class to create an instance of.
Returns [object] Object handle to the created instance.
FUNCTION GetDotNetCLR()  
FUNCTION GetDotNetCLR(wdxFlag)  
FUNCTION GetDotNetCLR(references$, namespace$)  
FUNCTION GetDotNetCLR(wdxFlag, references$, namespace$)  

Returns a custom, one-off instance of the .NET Common Language Runtime. Caller is responsible for deleting the instance.

ParameterDescription
wdxFlag [input, bool] Optional flag to process the request on the workstation side.
references$ [input, string] Comma separated list of additional assembly references to add.
namespace$ [input, string] Comma separated list of additional namespace (using) references to include.
Returns [object] Object handle to the common language runtime instance.
FUNCTION GetDotNetGeneric(className$, type1$)  
FUNCTION GetDotNetGeneric(className$, type1$, type2$)  

Creates an instance of a generic dot net class using the common, internal Common Language Runtime.

ParameterDescription
className$ [input, string] The name of the class to create an instance of.
type1$ [input, string] Optional name of a dot net type used for with generics. Example List
type2$ [input, string] Optional name of a second dot net type used for with generics. Example Dictionary
Returns [object] Object handle to the created instance.
FUNCTION GetDotNetStaticClass(staticClass$)  

Returns a reference to a dot net static class.

ParameterDescription
staticClass$ [input, string] Name of the static class (fully qualified as needed).
Returns [numeric] A reference to the static class for one time use to access its static members.
FUNCTION GetDotNetType(typeName$)  

Creates an instance of a dot net type using the common, internal Common Language Runtime.

ParameterDescription
typeName$ [input, string] The name of the type to create.
Returns [object] Object handle to the created type instance.
FUNCTION GetExceptionText$()  

Returns the value of MSG(-1) from the workstation or server.

Returns [string] The value of MSG(-1) from the workstation, if blank then returns the value from the server side if running Windx.
FUNCTION GetFormattedDate$(rawDate$)  
FUNCTION GetFormattedDate$(rawDate$, order$)  
FUNCTION GetInstalledHotFixes$()  
FUNCTION GetInstalledUpdates$()  
FUNCTION GetLastActivityInterval()  
FUNCTION GetModuleInfo(modCode$, devCode$)  
FUNCTION GetModuleInfo(modCode$, modName$, expDate$)  
FUNCTION GetModuleInfo(modCode$, everestFlg, modLevel, convLevel)  
FUNCTION GetModuleInfo(modCode$, everestFlg, modLevel, convLevel, sublevel, svcPack)  
FUNCTION GetModuleNotifications()  

Check notifications for the currently set module.

Returns retSUCCESS
FUNCTION GetModuleNumber(module$)  
FUNCTION GetModuleOptions(out.moduleList$)  
FUNCTION GetModuleUserCounts(modCode$, userLimit, userCount)  
FUNCTION GetModuleUserCounts(modCode$, userLimit, userCount, userNames$, checkingAvailability)  

Gets the current user count and user limit for a module.

ParameterDescription
modCode$ [input, string] The module code.
userLimit [output, numeric] The user limit for the module.
userCount [output, numeric] The number of users (by workstation) currently using a task in the module.
userNames$ [output, string] Optional. The list of user names currently using a user count.
checkingAvailability [input, bool] Optional. Flag indicating the caller is requesting the availability of a user count.
Returns [boolean] True if a user seat is available otherwise false.
FUNCTION GetModuleUserLicense(modCode$)  

Checks for an available user license for the given module and returns true if a user license is available or false if the limit is reached.

ParameterDescription
modCode$ [input, string] The module code to check for an available user license.
Returns [boolean] True if a user seat is available otherwise false.
FUNCTION GetNextSurrogate$(file$)  
FUNCTION GetObject(objectID)  
FUNCTION GetObject(className$)  
FUNCTION GetObject(className$, tableName$)  
FUNCTION GetOfficeReportTasks$(arg.userLogon$, arg.companyCode$, arg.reportEntity$)  

Returns a list of report task information which are available through role security.

ParameterDescription
arg.userLogon$ [input, string] The Sage 100 User logon name.
arg.companyCode$ [input, string] The Company code.
arg.reportEntity$ [input, string] The report entity.
Returns [string] List of report tasks for the report entity which the user has rights to in the company.
FUNCTION GetOfficeUser$(officeUserId$)  

Returns a Sage 100 user name that is active and mapped to the Office 365 User Principle Name.

ParameterDescription
officeUserId$ [input, string] The Office User Id.
Returns [string] The mapped Sage 100 user login name, or null if an active user is not mapped.
FUNCTION GetParameter(module$, parameter$, value)  
FUNCTION GetParameter(module$, parameter$, value, company$)  
FUNCTION GetParameter(module$, parameter$, value, company$, checkPvxOnSql)  
FUNCTION GetParameter(module$, parameter$, value$)  
FUNCTION GetParameter(module$, parameter$, value$, company$)  
FUNCTION GetParameter(module$, parameter$, value$, company$, checkPvxOnSql)  

Function to get a value from a module options table or a system table.

ParameterDescription
module$ [input, string] The module code.
parameter$ [input, string] The name of the module option.
value/value$ [input, numeric/string] The value of the numeric or string module option.
company$ {optional} [input, string] The company code.
checkPvxOnSql {optional} [input, bool] Option to check the company's Pvx data location if the SQL table was not found.
Returns [boolean] True if the module option value was retrieved, otherwise false.
FUNCTION GetPropertyValue(name$, value$, devCode$)  
FUNCTION GetPropertyValue(name$, value$)  
FUNCTION GetPropertyValue$(name$, devCode$)  
FUNCTION GetPropertyValue$(name$)  
FUNCTION GetSecurity(taskID)  
FUNCTION GetSelfServiceClaims$(officeUserId$)  
FUNCTION GetSelfServiceClaims$()  

Returns a list of self service claims to which the set external user has access.

ParameterDescription
officeUserId$ [input, string] The Office User Id.
Returns [string] The list of self service claims to which the user has access.
FUNCTION GetStampInfo(userStamp$, dateStamp$, timeStamp$)  
FUNCTION GetSubscriptionStatus(module$, taskKeyCheck$)  
FUNCTION GetSubscriptionStatus(module$)  
FUNCTION GetSubscriptionStatus()  

Wrapper function to call SY_Registration'GetSubscriptionStatus()

ParameterDescription
module$ [input, string] Optional module code.
taskKeyCheck$ [input, string] Optional task key to check.
Returns [numeric] retSUCCESS = success, retFAILURE = subscription expired, retWARNING = expired but within grace period.
FUNCTION GetTable(fullPath$, fileName$, path$, options, localfile)  
FUNCTION GetTable(fullPath$, fileName$, path$, options)  
FUNCTION GetTable(fullPath$, fileName$, path$)  
FUNCTION GetUserDisplayValue$()  
FUNCTION GetUserDisplayValue$(maxLength)  
FUNCTION GetUserDisplayValue$(maxLength, usrLogon$)  
FUNCTION GetUserDisplayValue$(maxLength, usrLogon$, usrKey$)  
FUNCTION GetUserDisplayValue$(maxLength, usrLogon$, usrKey$, refresh)  

Retrieves the value to be displayed for user identification for the user key or user logon given. If no user given, then the current user will be used. This uses the setting in SY_System that is set for the product and returns the value indicated if that value is blank in the user history table then the user logon will be returned as the display value.

ParameterDescription
maxLength [input, integer] {optional} Maximum length of display value to return. If not given will return the full length of the user display value.
usrLogon$ [input, string] {optional} User logon to be used to lookup the user display value. If not given then the value passed into the usrKey will be used. If both are blank then the current user logged in will be used.
usrKey$ [input, string] {optional} User key to be used to lookup the user display value. If not given then the value passed into the usrLogon will be used. If both are blank then the current user logged in will be used.
refresh [input, integer] {optional} Flag to indicate whether to refresh the cached values for User Display Option from the SY_System table.
Returns [string] Returns the value from the user history table according to the option set in SY_System. If that column is blank then the user logon will be returned. If user is not found then the value passed in will be returned.
FUNCTION GetUserKey$(user$)  
FUNCTION GetUserList(usrList$)  
FUNCTION GetUserList(usrList$, grpList$)  
FUNCTION GetVersion()  
FUNCTION GetWindowsDirectory(winDir$)  
FUNCTION ImpersonateOfficeUser(tenantId$, audience$, accessToken$, pwd$)  

Performs token validation to establish trust before providing the encrypted password for the mapped office user.

ParameterDescription
tenantId$ [input, string] Office 365 tenant id.
audience$ [input, string] The audience for the token.
accessToken$ [input, string] The token to validate.
pwd$ [output, string] The encrypted password of the mapped user.
Returns [bool] Success if the token is validated and an active mapped user was found.
FUNCTION ImportDotNetAppSettings(configFile$, wdxFlag)  
FUNCTION ImportDotNetAppSettings(configFile$)  

Import app settings from specified config file to the hosting exe config file (Pvxwin32.exe.config).

ParameterDescription
configFile$ [input, string] The path and config file name to import app settings from.
wdxFlag [input, bool] Optional flag to process the request on the workstation side.
Returns [numeric] returns the number of app settings that were imported.
FUNCTION InitiateUI()  
FUNCTION InitiateUI(options)  
FUNCTION InitiateWinAPI()  
FUNCTION InitTable(fileName$, path$)  
FUNCTION InvokeLink(link$, handle%)  
FUNCTION InvokeProgram(taskID)  
FUNCTION InvokeProgram(taskID, param$)  
FUNCTION InvokeProgram(taskID, param$, runHidden)  
FUNCTION InvokeProgram(progName$)  
FUNCTION InvokeProgram(progName$, param$)  
FUNCTION IsActivated(module$)  
FUNCTION IsActivated(module$, company$)  
FUNCTION IsAdvancedInstall()  

Returns true if one of the components, known to be "Advanced/Premium only" are found in this Sage 100 server installation.

FUNCTION IsAppInstalled(appName$, version)  
FUNCTION IsInstalled(module$)  
FUNCTION IsMember(roleName$)  

Check if the current user is member of a specific role

ParameterDescription
roleName$ [input, string] Role name to check
Returns [boolean] True = success, False = failure
FUNCTION IsModuleAvailable(module$)  
FUNCTION IsPiiConversionRequired()  
FUNCTION IsPiiConversionRequired(compCode$)  

Checks if PII conversion/re-encryption is required for a company.

ParameterDescription
compCode$ [input, string] The company to check. Defaults to current CompanyCode$
Returns [bool] True if required otherwise false.
FUNCTION IsPremiumInstall()  

Returns true if components, known to be "Premium only" are found in this Sage 100 installation. Note this may not always be 100% correct for example, during installation or migration when everything is not yet created or in place.

FUNCTION IsRegistered(module$)  
FUNCTION IsSageInternalInstallation()  

[Obsolete("SY_Session'IsSageInternalInstallation() is deprecated, please use SY_Registration'IsSageInternalInstallation() instead.")]

FUNCTION IsSelfServiceUser(arg.userLogon$)  

Checks if the user is the Sage 100 self service user.

ParameterDescription
arg.userLogon$ [input, string] The Sage 100 User.
Returns [bool] isTRUE if the user is setup for self service, otherise isFALSE.
FUNCTION IsSetup(module$)  
FUNCTION IsSetup(module$, company$)  
FUNCTION LaunchProgram()  
FUNCTION LaunchProgram(parameters$)  
FUNCTION LevelCompare(dataLevel, progLevel, convLevel, dataSublevel, progSublevel)  
FUNCTION LevelCompare(dataLevel$, progLevel, convLevel, dataSublevel, progSublevel)  
FUNCTION LockModuleUserCounts(modCode$)  

Creates a lock file to prevent a race condition when multiple workstations are seeking a user license simultaneously.

ParameterDescription
modCode$ [input, string] The module code.
Returns [numeric] The lock channel or zero if the lock was unsuccessful.
FUNCTION LogException$(logType$, logDescription$)  
FUNCTION LogException$(logType$, logDescription$, exceptionText$)  

Write the current exception or OS error to the activity log.

ParameterDescription
logType$ [input, string] Activity log type.
logDescription$ [input, string] Descriptive text describing when/where the exception occurred.
exceptionText$ [output, string] The exception text returned by MSG(-1).
Returns [string] The key to the activity log record that was created.
FUNCTION LogoffUser()  
FUNCTION Logon()  
FUNCTION LogonAdmin(password$)  
FUNCTION LogonFromFile(fileName$, key$)  
FUNCTION LookupModule(taskID, modCode$)  
FUNCTION LookupProgram(taskID, modCode$, progName$)  
FUNCTION LookupProgram(taskID, modCode$, progName$, args$)  
FUNCTION LookupProgram(taskID, modCode$, progName$, args$, taskName$)  
FUNCTION LookupProgram(taskID, modCode$, progName$, args$, taskName$, taskType$)  
FUNCTION LookupTask(progName$)  
FUNCTION LookupTask(progName$, parameter$)  
FUNCTION OpenSessionFiles()  
FUNCTION OpenTable(fileName$, path$, options, localfile, opt$, ddfTable$)  
FUNCTION OpenTable(fileName$, path$, options, localfile, opt$)  
FUNCTION OpenTable(fileName$, path$, options, localfile)  
FUNCTION OpenTable(fileName$, path$, options)  
FUNCTION OpenTable(fileName$, path$)  
FUNCTION OpenTable(ch, fileName$, path$, options, localfile, opt$, ddfTable$)  
FUNCTION OpenTable(ch, fileName$, path$, options, localfile, opt$)  
FUNCTION OpenTable(ch, fileName$, path$, options)  
FUNCTION OpenTable(ch, fileName$, path$)  
FUNCTION Ping()  
FUNCTION ProcessFiles(command$)  
FUNCTION ReadSettings(filename$, section$, settingsCount, settings${ALL})  
FUNCTION RefreshFileObj()  

Drop and create the File Object

FUNCTION ReleaseModuleUserCountsLock(modCode$)  

Releases the user count lock file.

ParameterDescription
modCode$ [input, string] The module code.
Returns [nothing]
FUNCTION ReleaseModuleUserLicense(modCode$)  

Releases a module user license that is being used by the current session.

ParameterDescription
modCode$ [input, string] The module code to release the user license for.
FUNCTION RemoveLock(lockFile$, lockCh)  

Removes an individual lock file info record for the current session and closes the given lock channel.

ParameterDescription
lockFile$ [input, string] The lock file name.
lockCh [input, numeric] The lock file channel.
Returns [nothing]
FUNCTION RemovePropertyValue(name$, devCode$)  
FUNCTION RemovePropertyValue(name$)  
FUNCTION RemoveWorkTable()  

Used to Remove orphand worktables created while printing reports

Returns [boolean] returns 1 if success or 0 if failure
FUNCTION RequestModuleUserLicense(modCode$)  

Requests a module user license to be used by the current session.

ParameterDescription
modCode$ [input, string] The module code to request the user license for.
Returns [boolean] True if a requested user seat is available otherwise false.
FUNCTION SetActiveTheme()  

Set the active theme based on User / Company / System Default

FUNCTION SetCompany(code$)  
FUNCTION SetCompany(code$, noChange)  
FUNCTION SetCompany(code)  
FUNCTION SetCompany(code, noChange)  
FUNCTION SetDate(modCode$, date$)  
FUNCTION SetDefaults(chan, record$)  
FUNCTION SetLastActivityTime()  
FUNCTION SetLauncherObject(objHandle)  
FUNCTION SetLauncherVersion(aVersion)  
FUNCTION SetModule(module$)  
FUNCTION SetModule(module, modCode$)  
FUNCTION SetModule(modules, modeCode$, resetActivatedModules)  
FUNCTION SetNoCompanyDatabase(setting)  
FUNCTION SetOfficeUser(officeUserId$, name$, pswd$)  

Validates the office user mapping and logs in as the mapped Sage 100 user.

ParameterDescription
officeUserId$ [input, string] The Office User Id.
name$ [input, string] The user logon name.
pswd$ [input, string] The password.
Returns [bool] retSUCCESS if successful, otherise isFAILURE.
FUNCTION SetParameter(module$, parameter$, value$)  
FUNCTION SetParameter(module$, parameter$, value)  
FUNCTION SetProgram(taskID)  
FUNCTION SetProgram(taskID, program$)  
FUNCTION SetSecurity(secObject, noDrop)  
FUNCTION SetSkipExitCheckForSession(val)  

Public function used to set the internal flag used to mark console records to be skipped by the exit check

ParameterDescription
val [input, bool] Value (isTRUE or isFALSE) to set the internal flag that will configure all tasks created.
FUNCTION SetSQLFlag(setting)  
FUNCTION SetUser(securityKey$)  
FUNCTION SetUser(name$, pswd$)  
FUNCTION SetUser(name$, pswd$, updateUser, userJobTitle$, userEmailAddress$)  

Validates user & password, if valid changes user

ParameterDescription
name$ [input, string] User's logon code
pswd$ [input, string] user's logon password
updateUser [input, boolean] from user logon and update job/email
userJobTitle$ [input, string] User's Job Title code
userEmailAddress$ [input, string] User's email address
Returns [boolean] True if no errors were encountered.
FUNCTION ShutdownAll()  
FUNCTION ShutdownAll(force)  
FUNCTION ShutdownAll(force, triggerCode)  

Shutdown all sessions

ParameterDescription
force [input, boolean] *Optional* Force close of task if close message fails
triggerCode [input, int] *Optional* Code used to identify trigger for closing tasks
Returns [boolean] True = success, False = failure
Trigger Codes
ValueDescription
1 Launcher Quit
2 Broadcast Shutdown All
3 Master Console close/kill task
4 Auto-Logoff
FUNCTION StartDotNetResolver()  
FUNCTION TerminateUI()  
FUNCTION UpdateConsoleRec(updates$)  

Update the current session's console record with the given name/value pairs.

ParameterDescription
updates$ [input, string] A comma separated list of name/value pairs for the values to update in the console record.
FUNCTION UseSqlTable(table$)  
FUNCTION WaitForPID(waitPID)  
FUNCTION WaitForPID(waitPID, timeout)  
FUNCTION WriteLog$(errorType$, errorText$)  
FUNCTION WriteLog$(errorType$, errorText$, errorCode, errorPgm$, errorLine)  
FUNCTION WriteLog(errorKey$, logFile$)  
FUNCTION WriteRegistryStartupEntries()  
FUNCTION WriteSettings(filename$, section$, settingsCount, settings${ALL})  

Properties inherited from: SY_Constant

retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, msgLinkHELP$, msgLinkMSG$, isFALSE, isTRUE, isYES$, isNO$, isBUSY$, edtNONE, edtEXISTS, edtNEW, ctlDISABLE, ctlENABLE, ctlSHOW, ctlHIDE, ctlLOCK, ctlUNLOCK, ctlLOCKORDISABLE, ctlUNLOCKORENABLE, popHIDE, popDISABLE, popSHOW, popSHOWCHECKED, grdMODEVIEW, grdMODEMAINT, grdMODEADD, filCREATE, filLOCK, filCREATELOCK, filGLOBAL, filCREATEGLOBAL, filLOCKGLOBAL, filCREATELOCKGLOBAL, filCHANNEL, filRAW, filPURGE, filLOAD, filINPUT, filNOOBJECT, filPVX, filREFRESH, filPVX4$, filPVX5$, pthCOMPANY$, pthOTHERCOMPANY$, pthPRCOMPANY$, pthOTHERPRCOMPANY$, pthSYSTEM$, pthUSER$, pthSOA$, pthHOME$, pthROOT$, pthDICTIONARY$, pthTEXTOUT$, pthLOCK$, pthLOCKSYS$, pthPREFIX$, pthARCHIVE$, pthLOGFILES$, folderPROGRAMFILES, folderPROGRAMFILESX86, folderCOMMONAPPLICATIONDATA, folderCOMMONPROGRAMFILES, folderCOMMONPROGRAMFILESX86, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, envSPP$, envDEFAULT$, dbALL$, dbNONE$, dateTOSTRINGFORMAT$, dateLONGMASK$, dateSHORTFMT, dateLONGFMT, dateYEARFIRST, dateMONTHFIRST, dateDAYFIRST, timeMINUTESMASK$, timeMINUTES24MASK$, timeSECONDSMASK$, timeSECONDS24MASK$, idxPRIMARY$, idxBATCH$, idxDISPLAY$, dirFIRST, dirLAST, dirNEXT, dirPREVIOUS, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typMASTERNUMI, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, modTASKOTFDISALLOW$, logALLACTIVITY$, logACTIVITY$, logERROR$, logACTNEWCUSTOMER$, logACTDATASYNC$, logACTDATAIMPORT$, logACTOPTIONCHANGED$, logACTPROGRAMLAUNCH$, logDFDM$, logSECURITY$, logTASKSCHEDULER$, logWEBERROR$, logVISUALINTEGRATOR$, logEntryIDLength, chkOFF$, chkON$, chkGRAYED$, closeTaskLAUNCHERQUIT, closeTaskSHUTDOWNALL, closeTaskMASTERCONSOLE, closeTaskAUTOLOGOFF, closeTaskDESCRIPTIONS$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, secDEFAULTCOMPANY$, regHKEY_CLASSES_ROOT, regHKEY_CURRENT_USER, regHKEY_LOCAL_MACHINE, regHKEY_USERS, regHKEY_CURRENT_CONFIG, regODBC_PATH$, regMAS_PATH$, E3_MYHANDLE, E3_TASK, E3_QUIT, E3_COCHANGE, E3_DATECHANGE, E3_USERCHANGE, E3_SRVRPATH, E3_HELPFILE, E3_TECHSUPPORT, E3_QUERYTOQUIT, E3_SUPERVISOR, E3_CUSTOMIZE, E3_SWITCHMODULE, E3_DISABLEWIN, E3_CURSOR, E3_USERID, E3_PRIVATETASK, E3_CHAT, E3_BROADCAST, E3_RELOAD, E3_PASSTHROUGH, E3_EXECUTE, E3_EXPCOCHANGE, E3_EXPTASK, E3_EXPLAUNCH, E3_SILENT, E3_DIRECT, E3_NODELIST, E3_OCXITEM, E3_MODULEID, E3_CUSTFAV, E3_HOMEPAGE, E3_MINIMIZE, E3_UNDOCKED, E3_DOCKED, E3_PUBLICTASK, E3_LAUNCHURL, E3_BTNCHANGE, E3_STDBTNRELOAD, E3_MYBUSINESS, E3_REGLOADED, E3_LOADED, E3_V4TASK, E3_PUBMODIFY, E3_TASKRELOAD, E3_SETAUTOHIDE, E3_COCHANGE2, E3_TASK_NC, E3_V4TASK_NC, E3_TASK_ALTC, E3_V4TASK_ALTC, E3_PASSWORD, E3_LAUNCHVIEW, E3_LAUNCHBIETASK, E3_CLEANUPBIE, E3_STARTVIEW, E3_BIE_ADMIN, E3_HELPPATH, E3_CUSTOMERID, E3_MASVERSION, E3_LAUNCHEMBEDDED, E3_LAUNCHERMENU, E3_APP_POINTSIZE, E3_LAUNCHERVERSION, E3_DISABLE, E3_ENABLE, E3_SHOW, E3_HIDE, E3_REFRESH, E3_LIBMASTER, WM_COPY, usrDspLOGON$, usrDspNAME$, usrDspCODE$, usrDspEMAIL$, wtsINITIALPROGRAM, wtsAPPLICATIONNAME, wtsWORKINGDIRECTORY, wtsOEMID, wtsSESSIONID, wtsUSERNAME, wtsWINSTATIONNAME, wtsDOMAINNAME, wtsCONNECTSTATE, wtsCLIENTBUILDNUMBER, wtsCLIENTNAME, wtsCLIENTDIRECTORY, wtsCLIENTPRODUCTID, wtsCLIENTHARDWAREID, wtsCLIENTADDRESS, wtsCLIENTDISPLAY, wtsCLIENTPROTOCOLTYPE, thmNORMAL, thmMETAL, thmOLIVE, rptREPORTTYPESTD, rptREPORTTYPELABEL, rptREPORTTYPEMULTCOL, rptISTRUE, rptISFALSE, rptISDEFAULT, rptPORTRAIT, rptLANDSCAPE, rptASCENDING, rptDESCENDING, rptRIGHTALIGN, rptLEFTALIGN, rptHORCENTERALIGN, rptLSSINGLELINE, rptSTSUM, rptSTAVERAGE, rptSTCOUNT, rptDFLTHSPACING, rptDFLTVSPACING, rptDFLTFONTSIZE, rptDFLTLEFT, rptDFLTTOP, rptTWIPSPERCHARW, rptTWIPSPERCHARH, rptSVTREPORTTITLE, rptEDTDISKFILE, rptGCANYVALUE, rptGCDAILY, rptCRDATEFIELD, rptCRDATETIMEFIELD, crEFTCrystalReport, crEFTRichText, crEFTWordForWindows, crEFTExcel, crEFTPortableDocFormat, crEFTHTML32, crEFTHTML40, crEFTExcelRecord, crEFTText, crEFTCharacterSeparatedValues, crEFTTabSeparatedText, crEFTEditableRTF, crEFTXml, crEFTRPTR, crEFTExcelWorkbook, cContextKeyLen1, cContextKeyLen2, cContextKeyLen3, adCmdText, adCmdStoredProc, adClipString, adExecuteNoRecords, adVarChar, adInteger, adParamInput, adParamOutput, adParamInputOutput, adParamReturnValue, adTextNoRecords, adOpenForwardOnly, adOpenStatic, adLockReadOnly, adUseServer, adUseClient, dbTMP$, dbTEMPDB$, dbSYSDB$, dbPVXDDF, dbPVXDB, dbMYSQL, dbADO, dbSQL, sqlSQLOLEDB$, LastErrorMsg$, LastErrorNum$, RoleTypes$, SageCloudAppDesc$, IolNomads$

Methods inherited from: SY_Constant

GetNOMADSIolist$(), GetRoleTypes$(), MaskString(), RawString(), ClassValidateEMailAddress(), dateTODAY$(), Element$(), fmtMODCODE$(), fmtMODPREFIX$(), PERFORM FunctionBreak(), GetExceptionMsg$(), GetFileName(), GetJobTitle$(), GetJobTitles(), GetPrinterProps(), GetRecordCount(), isALPHA(), isDATE(), isNUMERIC(), MsgPath$(), ParseString(), ParseTagField(), Position(), QUO$(), ValidateFormatType(), ZeroFill$()