Difference between revisions of "ActivityHistorySearch class"

From Catglobe Wiki
Jump to: navigation, search
Line 27: Line 27:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
 +
<source lang="javascript">
 +
//get mail, bulkmail history
 +
array userRid = {15210};
 +
ActivityHistorySearch search = new ActivityHistorySearch(userRid);
 +
search.SearchForMails = true;
 +
search.SearchForBulkMails = true;
 +
search.SearchForSMS = false;
 +
search.SearchForBulkSMS = false;
 +
search.SearchForCati = false;
 +
search.SearchForDialedCati = false;
 +
search.SearchForJournal = false;
 +
search.SearchForQuestionnaireActivity = false;
 +
DateTime dateFrom = new DateTime ("2016/1/30");
 +
search.SetSearchStartPeriod(dateFrom);
 +
ActivityHistory result = search.Execute();
 +
result.OrderByDate();
 +
for(number i = 0; i< result.Count; i++)
 +
{
 +
result.SetCurrent(i);
 +
print(result.ParentResourcePath );
 +
}
 +
</source>

Revision as of 08:04, 26 April 2019

ActivityHistorySearch



Search for activites by users.

Constructors

  • (int groupResourceId "Resource Id a group containing all users to fetch data for") - Create new default search parameters for communication history. Default is to find no kinds since forever
  • (Unknown userResourceIds "Resource Ids of users to fetch data for") - Create new default search parameters for communication history. Default is to find no kinds since forever

Methods

  • ActivityHistory Execute() - Find all the activities
  • Empty SetSearchStartPeriod(DateTime from "Date to start searching from, if empty since forever") - Set date to start searching from
  • string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • bool SearchForBulkMails { get; set; } - Get/Set include bulkmails in the result
  • bool SearchForBulkSMS { get; set; } - Get/Set include bulk SMS in the result
  • bool SearchForCati { get; set; } - Get/Set include cati in the result
  • bool SearchForDialedCati { get; set; } - Get/Set include cati calls that the users initiated in the result
  • bool SearchForJournal { get; set; } - Get/Set include journal entries in the result
  • bool SearchForMails { get; set; } - Get/Set include non-bulkmails in the result
  • bool SearchForQuestionnaireActivity { get; set; } - Get/Set include questionnaire activit in the result
  • bool SearchForSMS { get; set; } - Get/Set include non-bulk SMS in the result
  • TypeInformation TypeInformation { get; } - Get information about this class.

Examples

//get mail, bulkmail history 
array userRid = {15210};
ActivityHistorySearch search = new ActivityHistorySearch(userRid);
search.SearchForMails = true;
search.SearchForBulkMails = true;
search.SearchForSMS = false;
search.SearchForBulkSMS = false;
search.SearchForCati = false;
search.SearchForDialedCati = false;
search.SearchForJournal = false;
search.SearchForQuestionnaireActivity = false;
DateTime dateFrom = new DateTime ("2016/1/30");
search.SetSearchStartPeriod(dateFrom);
ActivityHistory result = search.Execute();
result.OrderByDate();
for(number i = 0; i< result.Count; i++)
{
	result.SetCurrent(i);
	print(result.ParentResourcePath );
}