Show / Hide Table of Contents

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
NSDiagnosticsAgent
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddWebAppUsage(NSWebAppUsage[])

Adds WebApp usage to existing log.

Declaration
Void AddWebAppUsage(NSWebAppUsage[] webAppUsages)
Parameters
Type Name Description
NSWebAppUsage[] webAppUsages
Returns
Type Description
Void
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
Type Description
Void
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
Type Description
Void
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
Void CollectTableSizes()
Returns
Type Description
Void
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
Void CollectWebUsage()
Returns
Type Description
Void
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
Void CollectWinUsage()
Returns
Type Description
Void
Examples
NSDiagnosticsAgent agent;
agent.CollectWinUsage();

FlushCaches()

Flushes all NetServer caches

Declaration
Void FlushCaches()
Returns
Type Description
Void
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
Type Description
Void
Examples
NSDiagnosticsAgent agent;
String[] cacheNames;
agent.FlushCachesByName(cacheNames);

GetCacheNames()

Gets the name of the caches that can be flushed

Declaration
String[] GetCacheNames()
Returns
Type Description
String[]
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
Type Description
NSWebAppUsage[]
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
Type Description
Void
Remarks

The granularity of the logging depends on the current configuration.

This call returns asynchronously, leaving the server to finish processing later on.
Examples
NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);

PerformTasksAfterUpgrade()

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
Type Description
String
Examples
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
Void ResyncUsers()
Returns
Type Description
Void
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);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top