SY_Session

 

Expand/Collapse all Show/Hide All

Overview

The SY_Session object must be created for each instance of ProvideX that starts up. It will contain all the important methods and properties needed by most other applications and base classes. In most cases, a pointer to this object must be passed into any other object created in Sage ERP MAS 90 or 200.

 

Expand/Collapse item Object Creation

Syntax

objhandle=new( SY_SESSION )

Inherits from

(none)

Parameters

 

Returns

objhandle

On success: Returns handle to the session object

On failure: Returns 0, object is not created

Example

! get session object

SysObj = new(SY_SESSION)

Notes

 

 

Object Use - Public

 

Expand/Collapse item Properties

 

Expand/Collapse item Caption$

Version of Sage ERP MAS 90 or 200 being run.

 

Expand/Collapse item PathCompany$

Path to the current company code (see SetCompany method).

 

Expand/Collapse item PathUser$

Path to the current user code (see SetUser method).

 

Expand/Collapse item PathSystem$

(Read only) Path to the SYSTEM data file directory.

 

Expand/Collapse item PathHome$

(Read only) Path to the HOME directory.

 

Expand/Collapse item PathBase$

(Read only) Path to the SOA program file directory.

 

Expand/Collapse item PathRoot$

(Read only) Root directory for Sage ERP MAS 90 system.

 

Expand/Collapse item PathCSRoot$

(Read only) UNC path to the Sage ERP MAS 90 system.

 

Expand/Collapse item PathHelp$

(Read only) Path to the HELP directory for online help.

 

Expand/Collapse item PathDictionary$

(Read only) Directory to Sage ERP MAS 90 data dictionary.

 

Expand/Collapse item PathPayroll$

(Read only) Path to the Payroll alternate directory.

 

Expand/Collapse item RootPrefix$

(Read only) Root directory prefix name.

 

Expand/Collapse item FileSuffix$

(Read only) Suffix for physical data files (for example, .SOA).

 

Expand/Collapse item CompanyKey$

(Read only) Current company surrogate key.

 

Expand/Collapse item CompanyCode$

(Read only) Current user's company code.

 

Expand/Collapse item CompanyName$

(Read only) Current company display name.

 

Expand/Collapse item CompanyList$

(Read only) List of all companies in the system.

 

Expand/Collapse item CompanyCodeList$

(Read only) List of all company codes.

 

Expand/Collapse item CompanyPaths$

(Read only) List of all company paths.

 

Expand/Collapse item CompanyPRPaths$

(Read only) List of all company payroll paths.

 

Expand/Collapse item CompanyKeyList$

(Read only) List of all company surrogate keys.

 

Expand/Collapse item UserKey$

(Read only) Current user's surrogate key.

 

Expand/Collapse item UserCode$

(Read only) Current user's three-character initials.

 

Expand/Collapse item UserName$

(Read only) Current user's logon name.

 

Expand/Collapse item UserList$

(Read only) List of all users on the system.

 

Expand/Collapse item UserCodeList$

(Read only) List of all user codes.

 

Expand/Collapse item UserGroupList$

(Read only) List of all customizer groups on system.

 

Expand/Collapse item UserGroupCode$

(Read only) List of all customizer group codes.

 

Expand/Collapse item Initialized

(Read only) Constant value used to validate instance of the session object.

 

Expand/Collapse item ModuleName$

(Read only) Current module name.

 

Expand/Collapse item ModuleCode$

(Read only) Current module code.

 

Expand/Collapse item ModuleLevel

(Read only) Current module level.

 

Expand/Collapse item ModuleDate$

Current module release date.

 

Expand/Collapse item ModuleEverest

(Read only) Is the current module 4.x?

 

Expand/Collapse item SystemDate$

(Read only) System date for applications.

 

Expand/Collapse item StartProgram$

(Read only) Program launched by session.

 

Expand/Collapse item StartProgramName$

(Read only) Program name/description.

 

Expand/Collapse item StartTask

(Read only) Task number of program launched by session.

 

Expand/Collapse item StartArguments$

(Read only) Arguments passed into program being launched.

 

Expand/Collapse item LauncherHwnd

Launcher HWND pointer.

 

Expand/Collapse item LauncherObj

(Read only) Launcher object handle.

 

Expand/Collapse item Updating

Set in the middle of an update.

 

Expand/Collapse item SessionID$

(Read only) Session ID for worktable generation.

 

Expand/Collapse item RegisteredName$

(Read only) Registered owner company.

 

Expand/Collapse item TerminalServer

(Read only) User running through Terminal Services.

 

Expand/Collapse item WorkstationName$

(Read only) User's workstation name.

 

Expand/Collapse item LegacyTerm$

(Read only) Legacy TERM$ string.

 

Expand/Collapse item CurrentPID

(Read only) Current process's Process ID.

 

Expand/Collapse item DateChanged$

(Read only) Modules that have had date changed in this session.

 

Expand/Collapse item RegistrationCheck$

(Read only) Modules that have had a registration checked.

 

Expand/Collapse item LegacyYRec$

(Read only) Legacy Y record from SY0CTL.

 

Expand/Collapse item DeveloperCode$

(Read only) Developer code if using a developer activation key.

 

Expand/Collapse item SessionCounter$

(Read only) Counter indicating session identifier (for Master Console).

 

Expand/Collapse item EscapeTrap

Escape trap property.

 

Expand/Collapse item ObjectInterface

(Read only) Indicates that the session was started through the object (COM) interface.

 

Expand/Collapse item LastOpenFileName$

(Read only) Name of last file opened.

 

Expand/Collapse item SQL

(Read only) Configured as SQL system.

 

Expand/Collapse item CS

(Read only) Configured as CS system.

 

Expand/Collapse item UI

(Read only) UI object.

 

Expand/Collapse item Wdx$

(Read only) [WDX] string set if running in CS environment (replaces %SYS_WDX$).

 

Expand/Collapse item Security

(Read only) Object pointer to the security object.

 

Expand/Collapse item FileObj

(Read only) Object pointer to the file I/O object.

 

Expand/Collapse item WinAPI

(Read only) Object handle to WinAPI for handling Windows API calls (*obj/winapi.pvc).

 

Expand/Collapse item WebEngine

(Read only) Boolean to identify when running from the Web Engine installation.

 

Expand/Collapse item CharacterProgram

TRUE if the program being run is a character-based program (set by SYCOMP).

 

 

Expand/Collapse item Startup Methods

 

Note ◄ indicates that an argument is an "out" parameter. A value will be stored in the passed variable as part of the method.

 

Expand/Collapse item Logon ( )

Log on the User. If Security is enabled SetUser() Method should be run instead.

 

Syntax

Object'Logon()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal=oSession'LogOn()

Notes

Sets User to the Default User

 

 

Expand/Collapse item InitiateUI( )

Start the UI.

 

Syntax

Object'InitiateUI(options)

Parameters

options

(optional)  1 = Used only when starting up a Legacy program.  Sets up fragmented status line and other Legacy-only UI parameters.

Returns

On success: Returns the handle to the SY_UI Object  

On failure: Returns 0

Example

RetVal = coSessionInitiateUI()

RetVal = coSessionInitiateUI(1)

Notes

 

 

 

Expand/Collapse item TerminateUI( )

Terminate the UI.

 

Syntax

Object'TerminateUI()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

RetVal = coSessionTerminateUI()

Notes

Drops the object handle for the UI Object.

 

 

Expand/Collapse item InitiateWinAPI( )

Initiate WinAPI.

 

Syntax

Object'InitiateWinAPI()

Parameters

(none)

Returns

On success: Returns handle to WinAPI object

On failure: Returns 0

Example

RetVal = coSessionInitiateWinAPI()

Notes

Creates Object handle for WinAPI.pvc.

 

 

Expand/Collapse item LaunchProgram( )

Check security and check for User and Company keys before launching program.

 

Syntax

Object'LaunchProgram(parameters)

Parameters

parameters$ (Optional)

Returns

Returns 1

Example

RetVal = coSessionLaunchProgram(parameters)

Notes

 

 

 

Expand/Collapse item LogonAdmin(password$)

This logon routine is only used to log in as the administrator. Users who forget the administrator password can use the "09SAM" or "!MAS90" password to get to the override screen which they'll need to print out and send to CSS to get an override password.

 

Syntax

Object'LogonAdmin(password$)

Parameters

password$

(required)  Administrator password

Returns

Returns 1

Example

RetVal = coSessionLogonAdmin(password$)

Notes

 

 

 

Expand/Collapse item LogonFromFile(fileName$,key$)

This method can be used to logon a user whose logon/code and password are stored in a file. The logic within each case of the switch will need to retrieve the values and then do a SetUser.

 

Syntax

Object'LogonFromFile(fileName$,key$)

Parameters

fileName$

(required)  File where user logon information is stored

key$

(required)  key to the file

Returns

On success: Returns 1

On failure: Returns 0

Example

tmpRetVal

=coSessionLogonFromFile(userfile,username)

Notes

 

 

 

Expand/Collapse item OpenSessionFiles( )

Open session files.

 

Syntax

Object'OpenSessionFiles()

Parameters

(none)

Returns

Returns 1

Example

tmpRetVal = coSession'OpenSessionFiles()

Notes

In the case of installation, files won't be opened on the create of the session object, but will need to be opened up later once the files have been created.

 

 

Expand/Collapse item CloseSessionFiles( )

Close session files.

 

Syntax

Object'CloseSessionFiles()

Parameters

(none)

Returns

Returns 0

Example

tmpRetVal = coSession'CloseSessionFiles()

Notes

 

 

 

Expand/Collapse item WriteRegistryStartupEntries()

Add ODBC entries to Registry. ODBC is configured as a User DSN (HKEY_CURRENT_USER).

 

Syntax

Object'WriteRegistryStartupEntries()

Parameters

(none)

Returns

Returns 1

Example

tmpRetVal = coSession'WriteRegistryStartupEntries()

Notes

 

 

 

Expand/Collapse item User Methods

 

Expand/Collapse item SetUser(securityKey$)

Find and set the user information based on securityKey$.

 

Syntax

Object'SetUser(securityKey$)

Parameters

securityKey$

Returns

Returns 1

Example

tmpRetVal = coSession'SetUser(SecurityKey$)

Notes

 

 

 

Expand/Collapse item SetUser(name,pswd$)

Set user information by key.

 

Syntax

Object'SetUser(name,pswd$)

Parameters

name

Numeric value of Userkey$ from SY_user

pswd$

User Password

Returns

Returns 1

Example

tmpRetVal = coSession'SetUser(0000000001,pswd$)

Notes

 

 

 

Expand/Collapse item SetUser(name$,pswd$)

Set user information by name.

 

Syntax

Object'SetUser(name$,pswd$)

Parameters

name$

Username$ from SY_user

pswd$

User Password

Returns

Returns 1

Example

tmpRetVal = coSession'SetUser(Steve,password$)

Notes

 

 

 

Expand/Collapse item GetUserList(usrList$,[grpList$])

Returns SEP separated list of users and groups.

 

Syntax

Object'GetuserList(usrList$,grpList$)

Parameters

usrList$

(Required) Returned SEP separated list of users

grpList$

(Optional) Returned SEP separated list of groups

Returns

Returns 1

Example

coSession'GetUserList(usrList$,grpList$)

Notes

 

 

 

Expand/Collapse item LogoffUser( )

Logs off user.

 

Syntax

Object'LogoffUser()

Parameters

(none)

Returns

Returns 1

Example

coSession'LogoffUser()

Notes

 

 

 

Expand/Collapse item GetUserKey(user$)

Get the user key.

 

Syntax

Object'GetUserKey$(user$)

Parameters

user$

(Required) Either a UserCode or UserLogon. If a UserCode is passed in it must be prefaced with a &

Returns

UserKey for the user record

Example

coSession'GetUserKey$(“&USR”)

coSession'GetUserKey$(“SampleUser”)

Notes

 

 

 

Expand/Collapse item Company and Program Methods

 

Expand/Collapse item SetCompany(code$, [noChange])

Reads the company file and obtains company-specific settings. Parameters are assigned into local object variables and can be accessed through the GetParameter() method.

 

Syntax

Object'SetCompany(code$,noChange)

Parameters

code$

(Optional) Company Code

noChange

(Optional) Flag to indicate not to change the default company code set in the users object so the next program launched starts in the Launchers company

Returns

Returns 1

Example

tmp = %SYS_SS'SetCompany(COMP$,1)

Notes

If no company masterfile file exists then an error 12 is raised.  If no record for the company exists in the masterfile then an error 11 is raised.  

Sets PathCompany$ property.

 

Expand/Collapse item SetCompany(code,[noChange])

Change company.

 

Syntax

Object'SetCompany(code,noChange)

Parameters

code

(Required) Company Code key

noChange

(Optional) Flag to indicate not to change the default company code set in the users object so the next program launched starts in the Launchers company

Returns

Returns 1

Example

retVal = coSession'SetCompany(NUM(newCompKey$),isTRUE)

Notes

Return success if we're already in the company we want to change to and return back success if no company code is passed in

 

 

Expand/Collapse item GetCompanyKey$(compCode$)

Returns back a surrogate key for the company code specified (not necessarily the current company).

 

Syntax

Object'GetCompanyKey(compCode$)

Parameters

compCode$

(Required) Company Code

Returns

Returns CompanyKey$

Example

retVal = coSession'GetCompanyKey$(compCode$)

Notes

 

 

 

Expand/Collapse item GetCompanyList(compList$)

Get company list.

 

Syntax

Object'GetCompanyList(compList$)

Parameters

compList$

(Required) Company list

Returns

Returns SEP separated list of Company Codes and Company Names

Example

tmpRetVal = coSession'GetCompanyList(compList$)

Notes

 

 

 

Expand/Collapse item GetCompanyDirectories(company$,mainPath$,prPath$)

Get company directories.

 

Syntax

Object'GetCompanyDirectories(company$,mainPath$,prPath$)

Parameters

company$

(Required) Company Code

mainPath$

(Required) Path to Company Data

prPath$

(Required) Path to Company Payroll Data

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'GetCompanyDirectories

(UCS(MID(newDir$,3,3)),newMain$,newPR$)

Notes

 

 

 

Expand/Collapse item SetProgram(taskID,program$)

Set program.

 

Syntax

Object'SetProgram(taskID,program$)

Parameters

taskID

(Required) TaskID of the program to be run

program$

(Optional) Program to run

Returns

On success: Returns Security object handle

On failure: Returns 0

Example

%SYS_SS'SetProgram(%SYS_SS'LookupTask("GL_ACCOUNTGROUP_UI"))

Notes

 

 

 

Expand/Collapse item SetModule([module$])

Set module.

 

Syntax

Object'SetModule([module$])

Parameters

module$

(Required)  Module Code

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal = coSession'SetModule("G/L")

Notes

 

 

 

Expand/Collapse item SetModule([module],modCode$)

Set Module Code by Module Number.

 

Syntax

Object'SetModule([module|module$],modCode$)

Parameters

module

(Required)  Module Code

modCode$

(Required) Module code

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal = coSession'SetModule(02, ModCode$)

Notes

 

 

 

Expand/Collapse item GetModuleNumber(module$)

This method returns back the module number from the module code file. Typically, the calling routine will have received the module code already and just needs to look up the module number.

 

Syntax

Object'GetModuleNumber(module$)

Parameters

module$

Module Code

Returns

Module Number

Example

retVal = coSession'GetModuleNumber(A/R)

Notes

 

 

 

Expand/Collapse item CopyParameters(module$)

Copy module options to the SY0CTL file.

 

Syntax

Object'CopyParameters(module$)

Parameters

module$

Module Code

Returns

Returns 1

Example

retVal = coSession'CopyParameters(A/R)

Notes

 

 

 

Expand/Collapse item SetDate(modCode$,date$)

Set module date.

 

Syntax

Object'SetDate(modCode$,date$)

Parameters

modCode$

(Required) Module Code

date$

(Required) Date in YYYYMMDD format

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal=coSession'SetDate("G/L","20050125")

Notes

 

 

 

Expand/Collapse item GetDate(modCode$,date$)

Get module date.

 

Syntax

Object'GetDate(modCode$,date$)

Parameters

modCode$

(Required) Module Code

date$

(Required) Date in YYYYMMDD format

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'GetDate("G/L",date$)

Notes

Sets Module Date from SY_ModuleDate file

 

 

Expand/Collapse item SetLauncherObject(objHandle)

Set launcher object handle.

 

Syntax

Object'SetLauncherObject(objHandle)

Parameters

objHandle

(Required) Object handle to SY_Launcher

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'SetLauncherObject(_OBJ)

Notes

 

 

 

Expand/Collapse item CheckForRequiredModules(module$)

Check for the required modules.

 

Syntax

Object'CheckForRequiredModules(module$)

Parameters

module$

(Required) Module Code

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'CheckForRequiredModules(module$)

Notes

Checks for modules that are required for this module

 

 

Expand/Collapse item Table Methods

 

Expand/Collapse item OpenTable(fileName$,path$,options,localfile)

Opens a channel to a specified table and returns channel back to calling routine.  The SY_File object must exist before this method will work (SY_File is instantiated on creation of SY_Session).

 

Syntax

object'OpenTable(fileName$,path$,[options, localFile])

Parameters

fileName$

(Required) Table/File Name (no extensions)

path$

(Required) The path determines where the file should be opened from.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary directory

options

(Optional) Combine (add) the following binary values to open files with specific properties or to create a file if it does not exist.

1 Create file if does not exist

2 Lock file upon opening

4 Open file on global channel

localFile

(Optional)To open the file locally (MAS 200 only) on the workstation, pass in a 1 for this parameter. If the system is not running in MAS 200, the parameter will be ignored. For normal file access, this parameter is not required.

Returns

On success: Returns file channel

On failure: Returns 0 (error raised)

Example

fCh = oSSOpenTable(SY_ZipCode,SYSTEM)

Opens the SY_ZipCode file in the MAS_SYSTEM directory.

 

fCh = oSSOpenTable(GL_Accounts,COMPANY)

Opens the GL_Account file in the current company directory (i.e. MAS_ABC or its alternate data directory).

 

fCh = oSSOpenTable(REPORT.RPT,TEXTOUT,0,1)

Opens the REPORT.RPT file in the HOME\TEXTOUT directory on the local users workstation (for CS reports).

 

fCh = oSSOpenTable(SY_System,SYSTEM,5)

Creates (if it doesnt exist) and opens the SY_System data file in the MAS_SYSTEM directory on a global channel (1 create plus 4 global channel = 5)

Notes

The calling program is responsible for keeping track of the file channel that is returned.  It will need to close the channel when it is finished with it.  The Session object does not maintain a list of files that have been opened through it.

 

 

Expand/Collapse item OpenTable(ch,fileName$,path$,options,localfile)

Same as first OpenTable except the channel specified in the ch variable is the channel the file is opened on..

 

Syntax

object'OpenTable(ch,fileName$,path$,[options, localFile])

Parameters

ch

(Required) Channel on which to open the Table/File Name

fileName$

(Required) Table/File Name (no extensions)

path$

(Required) The path determines where the file should be opened from.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary directory

options

(Optional) Combine (add) the following binary values to open files with specific properties or to create a file if it does not exist.

1 Create file if does not exist

2 Lock file upon opening

4 Open file on global channel

localfile

(Optional) To open the file locally (Sage ERP MAS 200 only) on the workstation, pass in a 1 for this parameter.  If the system is not running in Sage ERP MAS 200, the parameter will be ignored. For normal file access, this parameter is not required.

Returns

On success: Returns file channel

On failure: Returns 0 (error raised)

Example

fCh = oSSOpenTable(10,SY_ZipCode,SYSTEM)

Opens the SY_ZipCode file in the MAS_SYSTEM directory on channel 10.

 

fCh = oSSOpenTable(20,GL_Account,COMPANY)

Opens the GL_Account file in the current company directory (i.e. MAS_ABC or its alternate data directory) on channel 20.

 

fCh = oSSOpenTable(200,REPORT.RPT,TEXTOUT,0,1)

Opens the REPORT.RPT file in the HOME\TEXTOUT directory on the local users workstation (for CS reports) on channel 200.

 

fCh = oSSOpenTable(6,SY_System,SYSTEM,5)

Creates (if it doesnt exist) and opens the SY_System data file in the MAS_SYSTEM directory on a global channel (1 create plus 4 global channel = 5) on channel 6.

Notes

The calling program is responsible for keeping track of the file channel that is returned.  It will need to close the channel when it is finished with it.  The Session object does not maintain a list of files that have been opened through it.

 

 

Expand/Collapse item GetTable(fullPath$,fileName$,path$,options,localfile)

Get the full path for the specified table.

 

Syntax

object'GetTable(fullPath$,filename$,path$,[options, localFile])

Parameters

fullPath$

(Required) Full path for the specified file which will be retrieved by the method

fileName$

(Required) File name for which the path will be found

path$

(Required) The path determines where the file should be found.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary

options

(Optional) File options see SY_Constant for complete list of values

 2        Lock file

localfile

(Optional) This parameter is currently not used.

Returns

Returns 1

Example

Tmp = coSession

GetTable(fullPath$,GL_Account,COMPANY)

Returns full path to the GL_Account table for the current company

Notes

 

 

 

Expand/Collapse item CreateTable( fileName$, path$, [localFile], [dictionary$])

Creates a new table based on the entries in the data dictionary.  Note that a ProvideX table must be defined in the data dictionary before it can be built using this routine.

 

Syntax

object'CreateTable( fileName$, path$, [localFile], [dictionary$])

Parameters

fileName$

(Required) Table/File Name (no extensions)

path$

(Required) The path determines where the file should be opened from.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary directory

localFile

(Optional) To open the file locally (MAS 200 only) on the workstation, pass in a 1 for this parameter.  If the system is not running in MAS 200, the parameter will be ignored.  For normal file access, this parameter is not required.

dictionary$

(Optional) ProvideX Data Dictionary file name to be created if different from fileName$ parameter.

Returns

On success: Returns 1

On failure: Returns 0 (error raised)

Example

fCh = oSSCreateTable(SY_ZipCode,SYSTEM)

Creates the SY_ZipCode file in the MAS_SYSTEM directory.

Notes

The CreateTable method does not automatically open the file that was created.  This is usually because an application will branch to an error track if an OPEN fails because it does not exist, create the file, and then RETRY the OPEN statement.  The same functionality can also be accomplished using the OpenTable method with an option of 1.

 

 

Expand/Collapse item CreateWorkTable( fileName$[,sysFlag][,extension$])

Creates a worktable using the unique session id created by the Session object. If the optional sysFlag parameter is set, the worktable is created in the MAS_SYSTEM directory instead of the company data directory.

 

Syntax

object'CreateWorkTable( fileName$[,sysFlag][,extension$])

Parameters

fileName$

(Required) Name of work table to create

sysFlag

(Optional) Set to 1 if the worktable should be created in the MAS_SYSTEM database otherwise the worktable will be created in the company database

extension$

(Optional) File extension to use on the worktable if different than .M4T

Returns

On success: Returns 1

On failure: Returns 0

Example

cJournalWrkFH = coSessionCreateWorkTable (AR_CashReceiptsJournalWrk)

Create worktable for Cash Receipts Journal printing.  

Notes

 

 

 

Expand/Collapse item DropTable(fileName$,path$)

Drops (removes) the specified table from the system.

 

Syntax

object'DropTable(filename$,path$)

Parameters

fileName$

(Required) File name to erase

path$

(Optional) The path determines where the file should be erasedfrom.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary directory

Returns

On success: Returns 1

On failure: Returns 0

Example

coSession'DropTable("GL_DeleteAccountsWork", "COMPANY)

Erase the GL_DeleteAccountsWork table from the current company database

Notes

 

 

 

Expand/Collapse item InitTable(fileName$,path$)

Encapsulates the DropTable and CreateTable methods into one routine to allow tables to be removed and recreated.

 

Syntax

object'InitTable(filename$,path$)

Parameters

fileName$

(Required) File name to initialize

path$

(Required) The path determines where the file resides.  In place of the path, one of the following short cuts may be used:

COMPANY Path to company database

SYSTEM Path to MAS_SYSTEM directory

USER Path to users base directory

SOA Path to SOA directory

HOME Path to HOME directory

TEXTOUT Path to TEXTOUT directory

ROOT Path to root MAS90 directory

DICTIONARY Path to data dictionary directory

Returns

On success: Returns 1

On failure: Returns 0

Example

coSession'InitTable

("GL_AllocationSelectionCalc","COMPANY" )

clear calculations worktable

Notes

 

 

 

Expand/Collapse item SetDefaults(chan,record$)

Set record default values.

 

Syntax

object'setDefaults(ch,record$)

Parameters

char

(Required) File Channel

record$

(Required) (Out) REC(IOL(ch)) populated with default values from the Data Dictionary

Returns

Returns 0

Example

%SYS_SSSetDefaults(userFH,record$)

Notes

 

 

 

Expand/Collapse item Surrogate Key Methods

 

Expand/Collapse item GetNextSurrogate$(file$)

Retrieves the next surrogate key for the file specified.  All surrogate keys are ten digit numeric values that are zero-filled.

 

Syntax

object'GetNextSurrogate$(file$)

Parameters

file$

(Required) File name to retrieve next surrogate key for (no extensions or path)

Returns

On success:

Next surrogate key value (ten-character, zero-filled numeric string).  

 

On failure:

NULL the table has not been inserted into the SY_Surrogates table and will need to be added first.

Example

x$ = oSSGetNextSurrogate$(SY_Users)

Notes

objectGetNextSurrogate$(file$)

 

 

Expand/Collapse item AddSurrogate$(file$,field$)

Adds a new surrogate table into the surrogate key table (SY_Surrogates).  The routine must pass in the surrogate key field name so that the SY_Surrogates table can be rebuilt if necessary.

 

Syntax

object'AddSurrogate$(file$,field$)

Parameters

file$

field$

Returns

On success: Returns first surrogate key (0000000001)

On failure: NULL

Example

x$ = oSSAddSurrogate$(SY_Users,UserID)

Notes

This method only works for system data files.  Application data files that use other surrogate keys cannot call this routine (at this time).  If the applications adopt using this type of surrogate key, the surrogate key file should be maintained for each company.

 

 

Expand/Collapse item Parameter Methods

 

Expand/Collapse item GetParameter(module$,parameter$,[value|value$],company$)

Retrieves a specified parameter for a given module and optional company code. Parameter is returned in the value or value$ parameter.

 

Syntax

object'GetParameter(module$,parameter$,value$ | value [,company$])

Parameters

module$

(Required) Module code for the parameter to be looked up.  Use SYS for Library Master or system parameters

parameter$

(Required) Exact name of the parameter to be retrieved.  Should be the same name as defined in the data dictionary

value | value$

Return value of parameter.  Use string or numeric based on type of parameter retrieving

company$

(Optional) Pass in the three-character company code if the parameters being looked for are not in the current company

Returns

On success: Returns 1 (check value$/value variable)

On failure: Returns 0

Example

oSSGetParameter(SYS,LookupLimit,value$)

Notes

If the parameter specified is not in the list or the wrong type is specified, the function will return a failure (0). Make sure the parameters are spelled correctly and that the value$/value variable is the correct type.

 

 

Expand/Collapse item BuildTerm(term$,sysOptions$)

Creates the TERM$ and %SYS_OPTIONS$ parameter records primarily for legacy applications.

 

Syntax

object'BuildTerm(term$,sysOptions$)

Parameters

term$◄

TERM$ variable recreated using 4.x data files

sysOptions$◄

%SYS_OPTIONS$ variable recreated using 4.x data files

Returns

On success: Returns 1

On failure: Returns 0

Example

oSSBuildTerm$(term$,%SYS_OPTIONS$)

Notes

This routine can also be used by 4.x applications if they require a TERM$ variable or a FID(0) value.  FID values are assigned quazi-randomly eliminating the restriction of 300 or so defined FID values.  Only one TERM$ can be built per instance of the Session object.

 

 

Expand/Collapse item DropTermRecord()

Drops the TERM$ variable from the session object properties and removes the reference lock on the SY_Terminals data table.

 

Syntax

object'DropTermRecord()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

oSSDropTermRecord()

Notes

This method may become a protected method of the object as most application programs should not need to call this routine.  It will be automatically called upon the deletion of the Session object.  However, since only one TERM$ can be created per Session object, there may be a case where a program will need to drop the existing TERM$ and create a new one.

 

 

Expand/Collapse item SetParameter(module$,parameter$,[value$])

Sets string parameter (Library Master parameters only; modules should use the business object).

 

Syntax

Object'SetParameter(module$,parameter$,value$)

Parameters

module$

(Required) Module code

parameter$

(Required) String parameter to set

value$

(Required) Parameter value

Returns

On success: Returns 1

On failure: Returns 0

Example

Tmp = coSession'SetParameter

("SYSTEM","DefaultCompanyKey$",tmpCompanyKey$)

Notes

 

 

 

Expand/Collapse item SetParameter(module$,parameter$,[value])

Sets numeric parameter (Library Master parameters only; modules should use the business object).

 

Syntax

Object'SetParameter(module$,parameter$,value)

Parameters

module$

(Required) Module code

parameter$

(Required) Numeric parameter to set

value

(Required) Parameter value

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = _OBJ'SetParameter

("COMPANY","CompanyLevel",module.moduleLevel)

Notes

 

 

 

Expand/Collapse item Query Methods

 

Expand/Collapse item IsActivated(module$ [,company$])

Returns back a true or false to the calling routine if the application specified is installed for the current company (or company specified on the input parameter).

 

Syntax

object'IsActivated(module$ [,company$])

Parameters

module$

(Required) module$

company$

(Optional) company$

Returns

On success: Returns 1 (module is activated for this company)

On failure: Returns 0 (module is not activated)

Example

result=oSSIsActivated(A/R)

Notes

 

 

 

Expand/Collapse item IsInstalled(module$)

Boolean indicating that the specified module is installed. Has nothing to do with company data files, only that the module was installed by the user and program files exist for this module.

 

Syntax

Object'IsInstalled(module$)

Parameters

module$

(Required) Module code

Returns

On success: Returns 1 (module is Installed)

On failure: Returns 0 (module is not Installed)

Example

IF coSession'IsInstalled("J/C") {

IF coSession'IsActivated("J/C") {

JC_Integrated = isTRUE

}

}

Checks if Job Cost is installed and if it is set the integration flag.

Notes

 

 

 

Expand/Collapse item IsRegistered(module$)

Boolean indicating that the specified module has been registered or is a registered module.

 

Syntax

Object'IsRegistered(module$)

Parameters

module$

(Required) Module code

Returns

On success: Returns 1 (module is registered)

On failure: Returns 0 (module is not registered)

Example

SO_IntegrateStarship = coSession'IsRegistered("S/T")

Checks if StarShip is registered and sets flag.

Notes

 

 

 

Expand/Collapse item ApplicationInstalled(application$)

Check to see if an application is installed on a machine by looking for the class ID of the application.  Calling programs must pass in the application they want to check for (i.e. EXCEL).

 

Syntax

Object'ApplicationInstalled(application$)

Parameters

application$

(Required) application to check

Returns

On success: Returns 1

On failure: Returns 0

Example

coSession'ApplicationInstalled("Excel")

Check if Excel is installed.

Notes

 

 

 

Expand/Collapse item Invoke/Startup Methods

 

Expand/Collapse item InvokeProgram(taskID,param$)

Launch program by task.

 

Syntax

Object'InvokeProgram(taskID,[param$])

Parameters

taskID

(Required) Task ID for the SY_Task file for the program to launch

param$

(Optional) parameter to pass in to force the program that is launched to pre-load a record.

Returns

Returns 1

Example

PRG_RESULT  = %SYS_SS'InvokeProgram(PRG_TASKID)

Launch program based on TaskID

 

coSession'InvokeProgram

(coSession'LookupTask("IMWIAA"),"/"+ItemCode$)

Lookup task for Item Inquiry and launch task with a pre-loaded Inventory item.

Notes

This method can be used to invoke a new instance of a program.  To use this method, the task ID of the program to be run needs to be passed in.  To get this task ID from a program name, either look it up directly through the Tasksservice object or call the method LookupTask, which will return a task ID to the calling program.

 

 

Expand/Collapse item InvokeProgram(progName$,param$)

Launch program by name.

 

Syntax

Object'InvokeProgram(progName$,[param$])

Parameters

progName$

(Required) program name to launch

param$

(Optional) parameter to pass in to force the program that is launched to pre-load a record.

Returns

Returns 1

Example

coSession'InvokeProgram

("GL_BudgetMaintenance_ui", tmpFFA$)

Launch G/L Account Maintenance with a pre-loaded account.

Notes

 

 

 

Expand/Collapse item InvokeLink(link$,handle%)

Launch program link.

 

Syntax

Object'InvokeLink(link$,handle%)

Parameters

link$

(Required) program name/link to launch

handle%

(Required) windows handle for the program process

Returns

On success: Returns 1

On failure: Returns 0

Example

TMP=%SYS_SS'InvokeLink("SWPVUR",%P_WHND)

Launch viewer

Notes

 

 

 

Expand/Collapse item LookupTask(progName$,parameter$)

Lookup program task.

 

Syntax

Object'LookupTask(progname$,[parameter$])

Parameters

progName$

(Required) program name

parameter$

(Optional) parameter from the task file for the program being launched

Returns

On success: Returns 1

On failure: Returns 0

Example

optionsTaskID = coSession'LookupTask ("AR_OPTIONS_UI")

tmpTaskNo = %SYS_SS'LookupTask("CM_EDITOR.M4P")

Notes

 

 

 

Expand/Collapse item LookupModule(taskID,modCode$)

Look up module code for a specific task.

 

Syntax

Object'LookupModule(taskID,modCode$)

Parameters

taskID

(Required) task ID

modCode$

(Required) variable which will return the Module Code

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'LookupModule(taskID,modCode$)

Notes

 

 

 

Expand/Collapse item LookupProgram(taskID,modCode$,progName$,[args$],[taskName$])

Look up program information for a specific task.

 

Syntax

Object'LookupProgram(taskID,modCode$,progName$[,args$],[taskName$])

Parameters

taskID

(Required) task ID

modCode$

(Required) variable which will return the Module Code

progName$

(Required) variable which will return the program name

args$

(Optional) variable which will return the arguments for the task

taskName$

(Optional) variable which will return the task name

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = _OBJ'LookupProgram (taskID,module$,progName$,param$)

Notes

 

 

 

Expand/Collapse item GetModuleInfo(modCode$,devCode$)

Get developer code.

 

Syntax

Object'GetModuleInfo(modCode$,devCode$)

Parameters

modCode$

(Required) Module Code

devCode$

(Required) variable which will return the developer code

Returns

On success: Returns 1

On failure: Returns 0

Example

tmpRetVal = coSession'GetModuleInfo (ModuleCode$,devCode$)

Notes

 

 

 

Expand/Collapse item GetModuleInfo(modCode$,modName$,expDate$)

Get module name and expiration date.

 

Syntax

Object'GetModuleInfo(modCode$,modName$,expDate$)

Parameters

modCode$

(Required) Module Code

modName$

(Required) Variable which will return the Module Name

expDate$

(Required) Variable which will return the Expiration Date

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp2 = coSession'GetModuleInfo (modCode$,modName$,modExpDate$)

Notes

 

 

 

Expand/Collapse item GetModuleInfo(modCode$,everestFlg,modLevel,convLevel)

Get Everest flag and module level information.

 

Syntax

Object'GetModuleInfo(modCode$,everestFlg,modLevel,convLevel)

Parameters

modCode$

(Required) Module Code

everestFlg

(Required) variable which will return the Everest Flag (4.x Level)

modLevel

(Required) Variable which will return the Module Level

convLevel

(Required) Variable which will return the Conversion Level

Returns

On success: Returns 1

On failure: Returns 0

Example

tmpRetVal = coSession'GetModuleInfo (moduleCode$,cIsEverest,modLvl,convLvl)

Notes

 

 

 

Expand/Collapse item Lock File/Timestamp Methods

 

Expand/Collapse item CreateLock(lockFile$,[lockState],[lockSys])

Create a lock file.

 

Syntax

Object'CreateLock(lockfile$,[lockState],[lockSys])

Parameters

lockFile$

(Required) Lock File name to create

lockState

(Required) If this flag is set then the lockFile$ is created and locked otherwise the lockFile$ is just created

lockSys

(Required) If this flag is set then the lockFile$ is created in the LOCKSYS directory otherwise it is created in the LOCK directory

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal = coSession'CreateLock ("SO_SalesOrderHeader",tmplock)

Notes

 

 

 

Expand/Collapse item GetStampInfo(userStamp$,dateStamp$,timeStamp$)

Get user, date, and time stamp information.

 

Syntax

Object'CreateLock(userStamp$,dateStamp$,timeStmp$)

Parameters

userStamp$

(Required) User Stamp

dateStamp$

(Required) Date Stamp

timeStamp$

(Required) Time Stamp

Returns

On success: Returns 1

On failure: Returns 0

Example

tmpRetVal = coSession'GetStampInfo

(cUserStamp$, cDateStamp$, cTimeStamp$)

Notes

 

 

 

Expand/Collapse item Master Console Methods

 

Expand/Collapse item CreateConsoleRec(taskKey)

Create console record.

 

Syntax

Object'CreateConsoleRec(taskKey)

Parameters

taskKey

(Required) Task Key for which to create the console record

Returns

Returns 0

Example

launcherTask = coSession'LookupTask ("SY_Launcher")

coSession'CreateConsoleRec(launcherTask)

Lookup Launcher Task and then create the console record for it.

Notes

 

 

 

Expand/Collapse item CreateWorkstationRec( )

Create workstation record.

 

Syntax

 Object'CreateWorkstationRec()

Parameters

(none)

Returns

Returns 1

Example

retVal = _OBJ'CreateWorkstationRec()

Notes

Creates the workstation record if it does not exist and sets the global variable %SYS_UFID for legacy applications

 

 

Expand/Collapse item CheckForTask(taskKey)

Check for workstation task in SY_Console.M4T.

 

Syntax

Object'CheckForTask(taskKey)

Parameters

taskKey

(Required) Task Key for the console record

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

 

 

 

Expand/Collapse item CheckForLauncher( )

Check if the launcher exists.

 

Syntax

Object'CheckForLauncher()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

retVal = %SYS_ss'CheckForLauncher()

Notes

If a Launcher exists this method will fail and set an error message that the Launcher already exists.

 

 

Expand/Collapse item CheckForExit( )

Check for exit.

 

Syntax

Object'CheckForExit()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

IF coSession'CheckForExit() {

IF coSession'ShutdownAll() {

cShutdownFailed = isFALSE

shutdown        = isTRUE

RETURN shutdown

}

}

If the launcher is exited, shut down the system

Notes

 

 

 

Expand/Collapse item ShutdownAll( )

Shutdown all Launcher sessions.

 

Syntax

Object'ShutdownAll()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

IF coSession'ShutdownAll() {

cShutdownFailed = isFALSE

shutdown        = isTRUE

RETURN shutdown

}

Notes

 

 

 

Expand/Collapse item Error Log Methods

 

Expand/Collapse item WriteLog$(errorType$,errorText$,errorCode$,errorPgm$,errorLine$)

Report error to the error handler.

 

Syntax

object'WriteLog$(errorType$,errorText$ [,errorCode$,errorProgram$ ,errorLine$])

object'WriteLog(errorKey$,logFile$)

Parameters

errorType$

(Required)  Error type:

A Activity

E Error

errorText$

(Required) Text to insert into error log.  If NUL, the MSG of the error number will be used

errorCode$

(Optional) Error number encountered in the case of an E errorType

errorProgram$

(Optional) Program where the error was encountered in the case of an E errorType

errorLine$

(Optional) Line number where the error was encountered in the case of an E errorType

errorKey$

(Required) Key used to identify the error log entry which a logfile is to be appended to

logFile$

(Required) File pointer to a log file

Returns

WriteLog$ returns the errorKey$ that can be used to append a logfile if necessary.

Example

e$ = oSSWriteLog$(E,,12,GLWMAA,4505)

The first example creates the log entry and returns its own key.

x  = oSSWriteLog(e$,errlog0721.err)

The next line writes the log file back to the activity log for future reference.  Log files are created by the error handler and are not mandatory.

Notes

There are two WriteLog methods defined that are used specifically by the error handler exclusively.  The new error handler has the ability to write a log file out for each error encountered with the various pieces of data a support analyst would require to debug an issue.  To write the log file back to the original activity log record, use the second WriteLog method.

 

 

Expand/Collapse item Miscellaneous Methods

 

Expand/Collapse item CheckForProgram(programName$,[programPath$])

Validates that the file exists and is a ProvideX program.

 

Syntax

object'CheckForProgram(programName$, [programPath$])

Parameters

programName$

(Required) Program Name

 

Returns

On success: Returns 1

On failure: Returns 0

Example

result=oSessionObjCheckForProgram(programName$)

Notes

 

 

 

Expand/Collapse item CheckForFile(fileName$, path$)

Validates that the file exists and is a ProvideX keyed file.

 

Syntax

object'CheckForFile(fileName$, path$)

Parameters

fileName$

(Required) File to validate

 

Returns

On success: Returns 1

On failure: Returns 0

Example

result=oSessionObj’CheckForFile(fileName$)

Notes

 

 

Expand/Collapse item GetVersion( )

Get the current O/S version.

 

Syntax

object'GetVersion()

Parameters

(none)

Returns

On success:  Returns O/S version

On failure:    Returns 0

Example

version=oSessionObjGetVersion()

Notes

Uses the Kernel32 DLL GetVersion function

 

 

Expand/Collapse item ProcessFiles(command$)

Copy, move, or delete files.

 

Syntax

object'ProcessFiles(command$)

Parameters

command$

(Required) Command string

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

Uses the MASEXT32 DLL ProcessFiles function

 

 

Expand/Collapse item GetWindowsDirectory(windowsDirectory$)

Get path to windows directory.

 

Syntax

object'GetWindowsDirectory(windowsDirectory$)

Parameters

windowsDirectory$◄

(Required) Variable to contain the windows directory path

Returns

On success: Returns 1

On failure: Returns 0, raises error

Example

! get windows directory

tmp=oSessionObjGetWindowsDirectory(WinDir$)

-> ? WinDir$

c:\winnt

Notes

Uses the Kernel32 DLL GetWindowsDirectoryA function

 

 

Expand/Collapse item FormatDate$(rawDate$[formattedDate$][,mask$])

Format Date.

 

Syntax

Object'FormatDate(rawDate$[,formattedDate$,mask$])

Object'FormatDate$(rawdate$,[,mask$ | useDay])

Parameters

rawDate$

(Required) raw date

formattedDate$

(Optional)  

formattedDate$ - formatted date

Mask$ - Date mask

useDay not used

mask$

(Optional) date mask

Returns

On success: Returns 1 or formatted date

On failure: Returns 0

Example

coSession'FormatDate(cPostingDate$, formattedDate$)

Format posting date comment field

coSession'FormatDate(NextPeriodEndingDate$,cNextPeriodEndDate$)

AgingDate = JUL( coSession'FormatDate$(cExpectedAsOf$,isTRUE ))

Notes

 

 

 

Expand/Collapse item GetFormattedDate$(rawDate$,order$)

Get formatted date.

 

Syntax

Object'GetFormattedDate$(rawDate$[,order$])

Parameters

rawDate$

(Required) raw date

order$

(Optional) indicates which date format constant to use

0 = dateMONTHFIRST

1 = dateDAYFIRST

2 = dateYEARFIRST

Returns

On success: Returns formatted date

On failure: Returns  nul

Example

wrk.DateEnd$ = coSession'GetFormattedDate$(dateEnd$,"2")

! "YYYY-MM-DD"

Notes

 

 

 

Expand/Collapse item GetCalendarMonthEnd(rawDate$, monthEnd$)

Get month end.

 

Syntax

Object'GetCalendarMonthEnd(rawDate$, monthEnd$)

Parameters

rawDate$

(Required)  raw date

monthEnd$

(Required)  variable that will return the last day of the month

Returns

On success: Returns 1

On failure: Returns 0

Example

coSession'GetCalendarMonthEnd(agingBucketDate$, tmpDate$)

retVal = coSession'GetCalendarMonthEnd (cPeriodStartingDate$,cMonthEnd$)

Notes

 

 

 

Expand/Collapse item CheckValidPassword( )

Validate that the password meets acceptable minimums per system configuration settings.  Also check to see if password has expired (required to change after x days).

 

Syntax

Object'CheckValidPassword()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp2 = coSession'CheckValidPassword()

Notes

 

 

 

Expand/Collapse item WaitForPID(waitPID,timeout)

Wait for PID.

 

Syntax

Object'WaitForPID(waitPID, timeout)

Parameters

waitPID

(Required) PID

timeout

(Optional) Timeout

Returns

On success: Returns 1

On failure: Returns 0

Example

tmp = coSession'WaitForPID(waitPID)

Notes

 

 

 

Expand/Collapse item Cleanup( )

Cleanup.

 

Syntax

Object'Cleanup()

Parameters

(none)

Returns

Returns 0

Example

coSession'CleanUp()

Notes

Cleanup method must be run by the program that instantiates a session object.  The session object cannot drop these objects in the ON_DELETE method because of references to the session object within each of these objects that are being dropped.

 

 

Object Use - Protected

 

Expand/Collapse item Variables

 

Expand/Collapse item coRegistration

Object handle to the registration object.

 

Expand/Collapse item coMDRegistration

Object handle to the MD registration object.

 

Expand/Collapse item coLocal

Object handle to the Local Information object.

 

Expand/Collapse item cSystemIOL$

IOList of system parameters.

 

Expand/Collapse item cSystemData$

Data for system parameters in IOL format.

 

Expand/Collapse item cUserIOL$

IOList of user parameters.

 

Expand/Collapse item cUserData$

Data for user parameters in IOL format.

 

Expand/Collapse item cCompanyIOL$

IOList of company parameters.

 

Expand/Collapse item cCompanyData$

Data for company parameters in IOL format.

 

Expand/Collapse item cWorkstationIOL$

IOList of workstation parameters.

 

Expand/Collapse item cWorkstationData$

Data for workstation parameters in IOL format.

 

Expand/Collapse item cParamModule$

Last GetParameters Module.

 

Expand/Collapse item cParamEverest$

Last Getparameters Everest flag.

 

Expand/Collapse item cParamIOList$

Last GetParameters IOList.

 

Expand/Collapse item cParamData$

Last GetParameters Data.

 

Expand/Collapse item cUnified$

Unified Logon flag set.

 

Expand/Collapse item cRequirePW

Require Passwords flag.

 

Expand/Collapse item cStartINI$

Startup INI file.

 

Expand/Collapse item cConsoleFH

SY_Console file handle.

 

Expand/Collapse item cActFH

SY_Activation file handle.

 

Expand/Collapse item cCompanyAccessed$

List of companies accessed in Session.

 

Expand/Collapse item cFIDValue$

Local TERM$ FID.

 

Expand/Collapse item cTermCh

Terminal control channel.

 

Expand/Collapse item cSY0CTLCh

SY0CTL channel.

 

Expand/Collapse item cModsNoActivate$

List of Modules not to be activated.

 

Expand/Collapse item cLogonAttempts

Logon attempts this session.

 

Expand/Collapse item cMaxLogonAttempts

Max number of logon attempts.

 

Expand/Collapse item cPasswordDate

Change password in x days.

 

Expand/Collapse item cLegacyDateFmt

Legacy date format.

 

Expand/Collapse item cModuleFH

Channel for SY_Module table.

 

Expand/Collapse item cCompanyFH

Channel for SY_Company table.

 

Expand/Collapse item cContextFH

Channel for SY_Context table.

 

Expand/Collapse item cTaskFH

Channel for SY_Task table.

 

Expand/Collapse item cUserFH

Channel for SY_User table.

 

Expand/Collapse item cModuleDateFH

Channel for SY_ModuleDate table.

 

Expand/Collapse item cActLogFH

Channel for SY_ActivityLog.

 

Expand/Collapse item cWorkstationFH

Channel for Sy_Workstation.

 

Expand/Collapse item cSpawn

Value of the application server spawn property (Sage ERP MAS 200 only).

 

Expand/Collapse item cModuleCheck$

Module and Company Code used to check if SetModule already run.

 

Expand/Collapse item coSecurityObjects$

List of Security objects created.

 

Expand/Collapse item coSecEvent

Handle to Security Object.

 

Expand/Collapse item modNoRegistration$

List of Modules that dont need to be registered.

 

Expand/Collapse item modNoTrialPeriod$

List of Modules with no trial period.

 

Expand/Collapse item modNoCompany$

Modules that dont require a company code.

 

Expand/Collapse item cModuleFilter

Value to use to filter the Module record from SY_Task.

 

Expand/Collapse item cWorkstationParam$

List of workstation parameters.

 

Expand/Collapse item cDefaultUser$

Default user.

 

Expand/Collapse item cAdministrator$

Administrator.

 

Expand/Collapse item cBestDecCode$

Best Developer Code.

 

Expand/Collapse item cPRPrefix$

Payroll prefix.

 

Expand/Collapse item cRegisteredMods$

List of registered modules.

 

Expand/Collapse item Methods

 

Note ◄ indicates that an argument is an "out" parameter. A value will be stored in the passed variable as part of the method.

 

Expand/Collapse item GetParameterLegacy(module$,parameter$,value$)
GetParameterLegacy(module$,parameter$,value$,company$)

Retrieves module parameters for Legacy modules.

 

Syntax

_OBJ GetParameterLegacy(module$, parameter$, value$, company$)

Parameters

module$

Module for which the parameter lookup is being requested

parameter$

The name of the parameter for which the value is being requested

value$

Value of the requested parameter to be returned to the calling routine

company$

Optional, Company code for which the module parameter lookup should be performed.  If omitted the current company will be used.

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

This method only works for legacy applications that do not use the embedded dictionary.

 

 

Expand/Collapse item GetSecurityKey(code$)

Get the security key that will be used to log on to the system when a new program is invoked.

 

Syntax

_OBJGetSecurityKey(code$)

Parameters

code$

Security key returned to the calling routine

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

This method will fail if there are no users and the user just added users to the system.

 

 

Expand/Collapse item ResetErrorCodes()

Clears the LastErrorMsg$ and LastErrorNum$ properties.

 

Syntax

_OBJResetErrorCodes()

Parameters

(none)

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

 

 

 

Expand/Collapse item ValidateExternalAccess(user$,password$)

Handles special logon cases such as Web access and Business Insights.

 

Syntax

_OBJ ValidateExternalAccess(user$, password$)

Parameters

user$

User login name being validated

password$

Password being validated

Returns

On success: Returns 1

On failure: Returns 0

Example

 

Notes

This method will be used when the login name has a leading underscore.