Show / Hide Table of Contents

Class NSFavouriteAgent

Agent used for retrieving and setting favorites.

Syntax
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSFavouriteAgent()

Agent used for retrieving and setting favorites.

Declaration
NSFavouriteAgent
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddFavourite(String,Integer,Integer,String)

Adds a record in a table as a favorite for an associate

Declaration
Void AddFavourite(String tableName, Integer recordId, Integer associateId, String extraInfo)
Parameters
Type Name Description
String tableName
Integer recordId
Integer associateId
String extraInfo
Returns
Type Description
Void
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

AddFavourites(String,Integer[],Integer,String)

Adds a list of record IDs as favorites for an associate

Declaration
Void AddFavourites(String tableName, Integer[] recordIds, Integer associateId, String extraInfo)
Parameters
Type Name Description
String tableName
Integer[] recordIds
Integer associateId
String extraInfo
Returns
Type Description
Void
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

GetFavourites(String,Integer)

Gets all favorites for a table and associate

Declaration
NSFavourite[] GetFavourites(String tableName, Integer associateId)
Parameters
Type Name Description
String tableName
Integer associateId
Returns
Type Description
NSFavourite[]
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

IsFavourite(String,Integer,Integer)

Checks if a record in a table is a favorite for an associate

Declaration
Bool IsFavourite(String tableName, Integer recordId, Integer associateId)
Parameters
Type Name Description
String tableName
Integer recordId
Integer associateId
Returns
Type Description
Bool
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

RemoveAllFavourites(String,Integer)

Removes all favorites for a table and associate

Declaration
Void RemoveAllFavourites(String tableName, Integer associateId)
Parameters
Type Name Description
String tableName
Integer associateId
Returns
Type Description
Void
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

RemoveFavourite(String,Integer,Integer)

Removes favorite for a table, record ID, and associate

Declaration
Void RemoveFavourite(String tableName, Integer recordId, Integer associateId)
Parameters
Type Name Description
String tableName
Integer recordId
Integer associateId
Returns
Type Description
Void
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

RemoveFavouritesById(Integer[])

Removes favorite using favorite ID

Declaration
Void RemoveFavouritesById(Integer[] favoriteIds)
Parameters
Type Name Description
Integer[] favoriteIds
Returns
Type Description
Void
Examples
NSFavouriteAgent agent;
agent.callMethod(arg1, arg2);

ToggleFavourite(String,Integer,Integer,String)

Toggles a record in a table as a favorite for an associate

Declaration
Bool ToggleFavourite(String tableName, Integer recordId, Integer associateId, String extraInfo)
Parameters
Type Name Description
String tableName
Integer recordId
Integer associateId
String extraInfo
Returns
Type Description
Bool

true if added; false if removed.

Examples
NSFavouriteAgent agent;
String tableName;
Integer recordId;
Integer associateId;
String extraInfo;
Bool res = agent.ToggleFavourite(tableName, recordId, associateId, extraInfo);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top