Class SY_Registration

Known SubClasses

FM_QATest

Properties

LOCAL cNfrPayrollExpDate=JUL(2023, 12, 31)  

These next two values need to be changed for each version accordingly.

LOCAL cAuthorizedVersion=6.0  
LOCAL cGracePeriod  
LOCAL cUserKeyLen  
LOCAL cActualUserKey  
LOCAL cDemoSystem$="31353033393633"  
LOCAL cSubscriptionModules$=", P/R, "  
LOCAL cTaskKeysToExclude$=SEP+"010000047"+SEP+"010000089"+SEP+"010000035"+SEP  
Delimited list of task keys which are excluded from the subscription expiration check. "010000047" SY_Launcher_ui "010000089" SY_SagePepLaunch "010000035" SY_Options_ui
LOCAL adCmdText=1  
LOCAL adCmdStoredProc=4  
LOCAL adClipString=2  
LOCAL adExecuteNoRecords=128  
LOCAL adVarChar=200  
LOCAL adInteger=3  
LOCAL adParamInput=1  
LOCAL adParamOutput=2  
LOCAL adParamInputOutput=3  
LOCAL adParamReturnValue=4  
LOCAL adTextNoRecords=129  
LOCAL adOpenForwardOnly=0  
LOCAL adOpenStatic=3  
LOCAL adLockReadOnly=1  
LOCAL adUseServer=2  
LOCAL adUseClient=3  
LOCAL cPR0Mask$="|PR0|"  
Mask used to locate payroll tier flag 0
LOCAL cPR1Mask$="|PR1|"  
Mask used to locate payroll tier flag 1
LOCAL cPR2Mask$="|PR2|"  
Mask used to locate payroll tier flag 2
LOCAL cPR3Mask$="|PR3|"  
Mask used to locate payroll tier flag 3
LOCAL cPayrollTierLen=3  
Length of payroll tier license code used to parse the cPayrollTierLimits$ table of tier limits.
LOCAL cPayrollTierLimits$="PR01:10, PR02:25, PR03:50, PR04:75, PR05:100, PR06:150, PR07:-1, PR08:200, PR09:250, PR10:300, PR11:350, PR12:400, PR13:500"  
Table of tier limits.
LOCAL cUnlimitedPayrollTier=-1  
Indicates the subscription level is unlimited
LOCAL cDefaultTimeOut=15000  
Timout value for the entitlement service request
LOCAL cHashType  
Hash type used to hash table data
PROPERTY ModuleList$   * Read Only *
PROPERTY ExpDate$   * Read Only *
PROPERTY RegText$   * Read Only *

Methods

subscription info, skip the module record update.

FUNCTION CheckGracePeriod(serviceId$, graceEndDate$)  

Returns number of days remaining in the grace period for the given service or product id

ParameterDescription
serviceId$ [input, string] Agreed name or id that identifies the request for a paticular service or product.
graceEndDate$ [output, string] The date that this grace period will expire. Null if grace period has not been initiated.
Returns [numeric]
ValueDescription
Number of days until grace period expires or -1 (negative one) if the grace period has not been initiated.
FUNCTION CheckModifiedValue()  

Validates the expected value matches the current value.

Returns [boolean]
ValueDescription
retTRUE(1) The current value matches the expected value.
retFALSE(0) The current value does not match the expected value.
FUNCTION CheckSlsClient()  

Function used to indicate that the SLS Client is available

Returns [boolean] True if the client is available otherwise false.
FUNCTION CheckSubscriptionPlan()  

Checks the last successful SLS request date against the subscription plan update schedule. If the last date is on or after the planned next update request then an SLS request is made, and the last date is updated if the request was successful.

Returns [boolean]
ValueDescription
isTRUE if update was requested.
isFALSE if an SLS update was not requested.
FUNCTION CheckSubscriptionRequirements(module$)  

Confirms that requirements specific to a subscription based module are validated and in tact.

ParameterDescription
module$ [input, string] The module code or prefix to check.
Returns [boolean]
ValueDescription
retSUCCESS(1) If the requirements are met
retFAILURE(0) If the requirements are not met.
retWARNING(0) Requirement is not met but allow limited access.
FUNCTION GenerateModifiedValue()  

Generate the current value and save it for the next check.

Returns [boolean]
ValueDescription
retSUCCESS(1) If the value was generated and saved.
retFAILURE(0) If the operation was not able to complete.
FUNCTION GetEULADisplayForModule(module$)  

Get the status for display of the EULA for a module

ParameterDescription
module$ [input, string] module code of EULA to update status
Returns [boolean]
ValueDescription
retTRUE(1) The EULA should be displayed for the module
retFALSE(0) Do no display the EULA for the module
FUNCTION GetExpDate(date$)  
FUNCTION GetExpDate(module$, moduleExpDate$)  
FUNCTION GetExternalSeatCount()  
FUNCTION GetModuleList(list$)  
FUNCTION GetModuleNotifications(arg.moduleCode$)  

Check for module notifications.

ParameterDescription
arg.moduleCode$ [input, string] The module code to check.
Returns retSUCCESS
FUNCTION GetNamedUserCount()  
FUNCTION GetNtpDate$(doNotUsePCTimeOnFailure)  
FUNCTION GetNtpDate$()  

Gets the date from the Internet converted to the local timezone.

ParameterDescription
doNotUsePCTimeOnFailure [input, bool] Optional flag.
Returns [string] The date as string formated as YYYYMMDD or null on failure if flag is set.
FUNCTION GetNtpJulDate(doNotUsePCTimeOnFailure)  
FUNCTION GetNtpJulDate()  

Gets the date from the Internet and converts it to Julian.

ParameterDescription
doNotUsePCTimeOnFailure [input, bool] Optional flag.
Returns [numeric] The Julian date or zero on failure if flag is set.
FUNCTION GetPayrollTierLimit()  

Returns the upper limit of employees that can be paid under the current (local) payroll tier license code.

Returns [numeric]
ValueDescription
Number of days remaining. Zero when grace period has not been initiated or is expired.
FUNCTION GetSubscriptionStatus(module$, skipUpdate, taskKeyCheck$)  
FUNCTION GetSubscriptionStatus(module$, skipUpdate)  
FUNCTION GetSubscriptionStatus(module$)  
FUNCTION GetSubscriptionStatus()  

Gets the Registration (subscription) status.

ParameterDescription
module [input, string] Optional. The module to check the registration status for.
skipUpdate [input, boolean] Optional. Set this flag to skip the check for registration updates.
taskKeyCheck$ [input, string] Optional task key that is checked for exclusion.
Returns [numeric]
ValueDescription
retSUCCESS (1) Subscription is not expired.
retWARNING (-1) Subscription is expired but within grace period.
retFAILURE (0) Subscription is expired, graceperiod is expired.
FUNCTION GetSubscriptionValue$(name$)  
FUNCTION GetSubscriptionValue(name$)  

Gets the value for the subscription setting name.

ParameterDescription
name$ [input, string] The name of the subscription setting.
Returns [string] The value of the subscription setting.
FUNCTION GetTotalUsers(crmCount, inMAS, inCRM)  
FUNCTION GetUserCount()  
FUNCTION InitiateGracePeriod(serviceId$)  

Initiates the grace period for the given service or product id

ParameterDescription
serviceId$ [input, string] Agreed name or id that identifies the request for a paticular service or product.
Returns [boolean]
ValueDescription
retSUCCESS(1) If the grace period was successfully initiated
retFAILURE(0) If the grace period failed or has already been started.
FUNCTION IsSageInternalInstallation(customerNumber$)  
FUNCTION IsSageInternalInstallation()  

Determines whether the given customer number is for a Sage internal installation or not.

ParameterDescription
customerNumber$ [input, string] Sage 100 customer number to evaluate as internal or not.
Returns [boolean]
ValueDescription
retSUCCESS(1) If customer number is a Sage internal installation of Sage 100
retFAILURE(0) If customer number is NOT a Sage internal installation.
FUNCTION IsSubscriptionModule(module$)  

Indicates whether a module is registered on a subscription basis

ParameterDescription
module$ [input, string] The module code or prefix to check.
Returns [boolean]
ValueDescription
retSUCCESS(1) License for this module is subscription based
retFAILURE(0) This module has a perpetual license.
FUNCTION RegisterModules(subscriptionsOnly)  
FUNCTION RegisterModules()  

Register and apply the current product key to the module and subscription records.

ParameterDescription
subscriptionsOnly [boolean] Flag set by SY_Installation to only update the
Returns [boolean]
ValueDescription
retSUCCESS(1) If the module and subscription records have been updated.
retFAILURE(0) Not able to update - the registration or product key has not been set.
FUNCTION RegisterProvideX()  
FUNCTION RegisterProvideX(serialNo$, registrationKey$)  
FUNCTION SetSageInternalInstallation(customerNumber$)  

Function used by install shield to set system parameters, etc according to Sage internal installation specifications.

FUNCTION SlsNotify(code$, details$)  

Send a license infringement notification to SLS

ParameterDescription
code$ [input, string] Infringement code.
details$ [input, string] Infringement details.
Returns [boolean] True if notify operation completed normally, otherwise false.
FUNCTION UpdateEULADisplayForModule(module$, bDisplay)  

Update status for display of EULA for a module

ParameterDescription
module$ [input, string] module code of EULA to update status
bDisplay [input, number] a boolean to indicate if the EULA for the module should be displayed
Returns retSUCCESS(1)
FUNCTION UpdateModuleNotification(arg.moduleCode$, arg.status)  

Update the status of the module notifications.

ParameterDescription
arg.moduleCode$ [input, string] The module code to update.
arg.status [input, bool] A bool value to indicate the status.
Returns retSUCCESS
FUNCTION UpdateModuleRecords()  
FUNCTION UpdateProductKeyData()  

Method to clear/reset the subscription list appropriatly when the product key has been manually entered.

FUNCTION UpdateSubscriptionDataForNFR()  

Logic required when bypassing the SLS update for NFR registered installations.

FUNCTION UpdateSubscriptions(timeOut, updateKeys)  
FUNCTION UpdateSubscriptions(timeOut)  
FUNCTION UpdateSubscriptions()  

Initiates a request to the SLS Client to check for updated entitlement data.

ParameterDescription
timeOut [input, numeric] Optional timeout value. cDefaultTimeout is used if zero.
updateKeys [input, bool] Optional set this flag to update the reg keys from SLS, otherwise only expiration dates are updated.
Returns [numeric]
ValueDescription
retSUCCESS(1) If the update was successful
retFAILURE(0) If an error occured checking for updates
retWARNING(-1) The check was successful, but no updates were found
FUNCTION Validate()  
FUNCTION Validate(module$)  
FUNCTION ValidateMASUsers(CRMuserList$)  
FUNCTION ValidateSageCRM(userList$)  
FUNCTION LOCAL FormatSLSDate$(name$, date$)  

Reformats date from the format returned by SLS (YYYY/MM/DD) to YYYYMMDD.

ParameterDescription
name$ [input, string] Name used in the subscription list of name/value pairs for this data value.
date$ [input, string] Date in the assumed format of YYYY/MM/DD
Returns [string] A name/value pair formated to be used in the SubscriptionList$ field in SY_System.
ValueDescription
name$ + " + reformated date + " + "," or null if the date was not valid
FUNCTION LOCAL GetExpirationDateForModule$(module$)  

Returns the appropriate expiration date for the given module. For perpetual modules that allow a trial period, it returns today's date plus (cGracePeriod), for subscription modules, it returns the date contained in the local subscription/entitlement data (GetSubscriptionList()).

ParameterDescription
module$ [input, string] The module code or prefix to get the expire date for.
Returns [string] The expiration date.
FUNCTION LOCAL GetModulePropertyValue$(oModule, propertyName$, collectionName$)  
FUNCTION LOCAL GetModulePropertyValue$(oModule, propertyName$)  

Iterates the entitlement'Module'Properties[Constraints] collection for an items name and if found returns the value.

ParameterDescription
oModule [input, object] Handle to a [.NET] entitlement'Module object.
propertyName$ [string, input] The requested property name.
collectionName$ [string, input] Optional collection name, Propreties or Constraints. Default=Properties.
Returns [string] The property value if found, otherwise null.
FUNCTION LOCAL GetPayrollTier$()  

Returns the current (local) payroll tier license code.

FUNCTION LOCAL GetSecurityChecksum$(data$, base$)  

Performs security checksum algorith on the data string provided, ensures that it does not contain a SEP, and returns the value.

ParameterDescription
data$ [input, string] The string value on which to get the checksum value for.
base$ [input, string] A string value to use as the basis of the checksum value.
Returns [string] The checksum value.
FUNCTION LOCAL GetSoftwareInfo(clr)  

Create, populate and return a Sage100.SLS.Client.Common.SoftwareInfo object

ParameterDescription
clr [input, object] Handle to the .NET common language runtime used to create the returned object.
Returns [object] The populated software info object
FUNCTION LOCAL GetSubscriptionList(subscriptionList$, securityOverride)  
FUNCTION LOCAL GetSubscriptionList(subscriptionList$)  

Gets/validates current SubscriptionList value

ParameterDescription
subscriptionList$ [out, string] Current local subscription values.
securityOverride [input, boolean] Optional. This overrides the security checksum and returns the list regardless.
Returns [boolean]
ValueDescription
retSUCCESS(1) If the subscription values passed validation
retFAILURE(0) If validation failed.
FUNCTION LOCAL GetTableValue$(table$)  

Function used by Generate & Check Modified Value to read a tables data and return the checksum.

ParameterDescription
table$ [input, string] The table to get the value for.
Returns [string] The checksum of the table data.
FUNCTION LOCAL RemoveSubscriptionSetting(setting$)  

Removes the setting (name & value) from the subscription list.

ParameterDescription
setting$ [input, string] The name of the setting to remove
Returns [boolean]
ValueDescription
isTRUE (1) If the setting was found and removed.
isFALSE (0) If the setting was not found in the subscription list.
FUNCTION LOCAL SetLocalRegistrationVars()  

Sets/resets the local registration values with the current values from SY_System

FUNCTION LOCAL PERFORM SetModuleDefaults()  

Subroutine used to set the module record defaults

FUNCTION LOCAL SetSubscriptionList(subscriptionList$)  

Sets/updates the SubscriptionList column with CRC check key

ParameterDescription
subscriptionList$ [input, string] New or updated subscription values to set.
Returns [boolean]
ValueDescription
isTRUE If the subscription value(s) are new or changed.
isFALSE If nothing changed in the current susbcription values.
FUNCTION LOCAL ValidateModuleChecksum(module$)  

Validates the stored SecurityChecksum value against the current checksum. If the checksum is the default value, then the expiration date and new checksum are set for the module.

ParameterDescription
module$ [input, string] The module code or prefix to check.
Returns [numeric]
ValueDescription
retSUCCESS(1) The checksum is valid or successfully reset.
retFAILURE(0) The checksum is not valid.
retWARNING(-1) The checksum is the default value. I.e. When a module is installed the first time.
FUNCTION LOCAL WriteModuleExpDate(module$)  

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$, folderCOMMONPROGRAMFILES, folderCOMMONAPPLICATIONDATA, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, 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, 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$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, 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, 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, LastErrorMsg$, LastErrorNum$, SageCloudAppDesc$, IolNomads$

Properties inherited from: SY_OpenObject

cLockInfoNOKEY$

Properties inherited from: SY_Password

AESCipher$, AES256Cipher$

Methods inherited from: SY_Constant

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

Methods inherited from: SY_OpenObject

CheckWhoHasLock(), CreateLockInfo(), RemoveLockInfo(), OpenTable(), OpenTempFile()

Methods inherited from: SY_Password

ConfirmAESKey(), ConfirmPassword(), EncryptAESData(), EncryptAESKey(), EncryptAESPassword(), EncryptPassword(), GetAESDataTest$(), PasswordAcceptable(), ValidateAESData(), ValidateAESPassword(), ValidatePassword(), VerifyAESDataEncryption(), DecryptAESData(), DecryptAESKey(), DecryptAESPassword(), DecryptAltAESData(), DecryptPassword(), EncryptAltAESData(), GetKEK$(), InitAESKey(), InitializeAES(), InitializeAltAES(), ValidateAltAESData(), VerifyAltAESDataEncryption()