RegradeApp

ACCPAC Common Controls

AccpacMultiuser.RegradeApp

Upgrades (from shared to exclusive) or downgrades (from exclusive to shared) a lock on an application's data.

Function RegradeApp(
  OrgID As String,
  AppID As String,
  Upgrade As Boolean) As tagMultiuserStatus

Parameters

OrgID

[in] organization (database) ID of the company

AppID

[in] two-letter application ID of the application whose lock is being upgraded or downgraded

Upgrade

[in] flag indicating whether the program's lock on the application's data should be upgraded (TRUE) or downgraded (FALSE)

Return Value

Returns the status of the call.

Remarks

If possible, avoid using this method. Lock manipulation should be done by views rather than by UIs. Lock manipulation (by the UI or macro) is especially dangerous when ACCPAC is running remotely over the Internet.

Before calling RegradeApp, the program must have already locked the application's data by calling LockApp. Calls to RegradeApp may be nested. If a program initially has shared access to the application's data, nested calls to RegradeApp to upgrade and then restore the program's lock on the application's data will result in the data being locked exclusively until the outermost level of nested calls restores the lock, returning it to shared access.