• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Activities

•
Version: 10
Some tooltip text!
• 1 minute to read
 • 1 minute to read

You can also use NSContactAgent to check what's going on.

GetMyActiveContacts

Here we get all activities that happened the last week for companies tied to the currently signed-in user.

You can filter by category and action type.

Tip

Set the start time to a future date to get all activities since the last sign-in.

NSContactAgent contactAgent;

DateTime start;
Integer[] categories; // ignore filter

NSContactActivity[] activities = contactAgent.GetMyActiveContacts(start.addDay(-7), categories, 63);

for (Integer i = 0; i < activities.length(); i++) {
  NSContactActivity a = activities[i];
  printLine("At " + a.GetActionTime().toString() + ", " + a.GetActivityPersonName() + " did something to " + a.GetName());
}

NSContactSummary GetContactSummary(Integer contactId, Integer limit)

Get a summary of a company's recent activity.

Integer contactId = 2;
NSContactAgent agent;

NSContactSummary summary = agent.GetContactSummary(contactId, -1);

NSActivitySummaryItem[] followups = summary.GetFollowups();

for (Integer i = 0; i < followups.length(); i++) {
  printLine(followups[i].GetDate().toString());
}
Tip

You can explore other collections in the activity summary too.

Action types

Value Description
1 created
2 updated
4 new activity
8 activity completed
16 person added
32 person updated
Tip

To request more than one action type, summarize the values. 63 means include all.

In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top