Class NSDiagnosticsAgent
Diagnostics, usage data collection, caches, and flushing
Syntax
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSDiagnosticsAgent()
Diagnostics, usage data collection, caches, and flushing
Declaration
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
Methods
AddWebAppUsage(NSWebAppUsage[])
Adds WebApp usage to existing log.
Declaration
Void AddWebAppUsage(NSWebAppUsage[] webAppUsages)
Parameters
Returns
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
ChangeLogSettings(Bool,Bool,Bool,Bool,Bool,Bool,Bool,Bool)
Changes NetServer log settings.
Declaration
Void ChangeLogSettings(Bool logWarning, Bool logInformation, Bool logSuccessAudit, Bool logFailureAudit, Bool logToEventLog, Bool logToSuperOffice, Bool logToFile, Bool logToTrace)
Parameters
Type |
Name |
Description |
Bool |
logWarning |
|
Bool |
logInformation |
|
Bool |
logSuccessAudit |
|
Bool |
logFailureAudit |
|
Bool |
logToEventLog |
|
Bool |
logToSuperOffice |
|
Bool |
logToFile |
|
Bool |
logToTrace |
|
Returns
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
CollectDataAdditions()
Collects and transmits usage statistics: Database Additions. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
Declaration
Void CollectDataAdditions()
Returns
Examples
NSDiagnosticsAgent agent;
agent.CollectDataAdditions();
CollectTableSizes()
Collects and transmits usage statistics: Table Sizes. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
NSDiagnosticsAgent agent;
agent.CollectTableSizes();
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
agent.CollectTableSizes();
CollectWebUsage()
Collects and transmits usage statistics: Web-based clients Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
agent.CollectWebUsage();
CollectWinUsage()
Collects and transmits usage statistics: Windows CRM Client Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
NSDiagnosticsAgent agent;
agent.CollectWinUsage();
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
agent.CollectWinUsage();
FlushCaches()
Flushes all NetServer caches
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
FlushCachesByName(String[])
Flushes all NetServer caches named
Declaration
Void FlushCachesByName(String[] cacheNames)
Parameters
Type |
Name |
Description |
String[] |
cacheNames |
|
Returns
Examples
NSDiagnosticsAgent agent;
String[] cacheNames;
agent.FlushCachesByName(cacheNames);
GetCacheNames()
Gets the name of the caches that can be flushed
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
String[] res = agent.GetCacheNames();
GetWebAppUsagesForPeriod(DateTime,DateTime,String)
Gets all WebAppUsages for a given period, that match an optional search term
Declaration
NSWebAppUsage[] GetWebAppUsagesForPeriod(DateTime fromDate, DateTime toDate, String searchTerm)
Parameters
Type |
Name |
Description |
|
fromDate |
|
|
toDate |
|
String |
searchTerm |
|
Returns
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
LogViewState(String)
Logs a change in view state.
Declaration
Void LogViewState(String viewState)
Parameters
Type |
Name |
Description |
String |
viewState |
|
Returns
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);
After upgrading to a new file set, there may be tasks that need to be done. Fpr example, import new TypicalSearches, if present. Tasks performed here need to be idempotent and independent of the actual upgrade jump (what was the previous version). They should complete in a reasonable time, not more than a few minutes maximum.
Declaration
String PerformTasksAfterUpgrade()
Returns
NSDiagnosticsAgent agent;
String res = agent.PerformTasksAfterUpgrade();
ResyncUsers()
Resynchronizes user information with SuperOffice Community, if opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
Declaration
Returns
Examples
NSDiagnosticsAgent agent;
agent.ResyncUsers();
WebAppUsageExistsInPeriod(Integer,String,DateTime)
Checks if viewState has been clicked at least once since a date.
Declaration
Bool WebAppUsageExistsInPeriod(Integer associateId, String viewState, DateTime fromDate)
Parameters
Type |
Name |
Description |
Integer |
associateId |
|
String |
viewState |
|
|
fromDate |
|
Returns
Type |
Description |
Bool |
true if viewState has been clicked at least once since FromDate, if asscoiateId < 0 or FromDate is DateTime.MinValue no restriction given for those parameters.
|
Examples
NSDiagnosticsAgent agent;
Integer associateId;
String viewState;
DateTime fromDate;
Bool res = agent.WebAppUsageExistsInPeriod(associateId, viewState, fromDate);