Published on February 14, 2024.
One of the recent enhancements that a NetSuite client requested to their custom mobile app was for sales reps to be able access phone calls that are associated with their customers.
To access phone calls via SuiteQL, we can query the PhoneCall table. Here's an example query that I wrote to get the phone calls associated with a specific company.
SELECT PhoneCall.ID, PhoneCall.ExternalID, PhoneCall.CreatedDate, PhoneCall.StartDate, PhoneCall.CompletedDate, BUILTIN.DF( PhoneCall.Owner ) AS OwnerName, BUILTIN.DF( PhoneCall.Assigned ) As AssignedToName, PhoneCall.Company, Entity.AltName AS CompanyName, PhoneCall.Contact, BUILTIN.DF( PhoneCall.Contact ) AS ContactName, BUILTIN.DF( PhoneCall.Transaction ) AS TransactionName, BUILTIN.DF( PhoneCall.RelatedItem ) AS RelatedItemName, BUILTIN.DF( PhoneCall.SupportCase ) AS SupportCaseName, PhoneCall.Priority, PhoneCall.Status, PhoneCall.Phone, PhoneCall.Title, PhoneCall.Message FROM PhoneCall LEFT OUTER JOIN Entity ON ( Entity.ID = PhoneCall.Company ) WHERE ( PhoneCall.Company = 359 ) ORDER BY PhoneCall.CreatedDate DESC
You may be wondering why I'm joining to the Entity table, instead of using BUILTIN.DF on the Company value. It's because BUILTIN.DF doesn't work properly on that column. Instead, it simply returns the record ID.
There are three additional undocumented Phone Call-related tables that you might find to be helpful. Unfortunately, you won't find these in the Records Catalog.
The tables are PhoneCallCompanyMap (a join table between a PhoneCall record and any companies it is associated with), PhoneCallContactMap (a join table between a PhoneCall record and any contacts it is associated with), and PhoneCallEventFile (a join table between a PhoneCall record and any files attached to it).
If you're going to use the PhoneCall table as part of an integration, you'll need to use a role that has this permission assigned to it: Lists - Phone Calls
And finally, here's a table that lists columns in the PhoneCall table, as well as information on the NetSuite features that need to be enabled for some of the columns to be applicable.
Column Description | Column Name | Applicable Feature |
---|---|---|
Assigned To | assigned | |
Bill of Materials | bom | Advanced Bill of Materials |
Bill of Materials Revision | bomrevision | Advanced Bill of Materials |
Comments | message | |
Company | company | |
Contact | contact | |
Created By | owner | |
Date Completed | completeddate | |
Date Created | createddate | |
End time | endtime | |
External ID | externalid | |
Files | files | |
Internal ID | id | |
Item | relateditem | |
Last Modified Date | lastmodifieddate | |
Manufacturing Routing | mfgrouting | Manufacturing Routing and Work Center |
Phone | phone | |
Priority | priority | |
Private | accesslevel | |
Reminder type | remindertype | |
Set up Reminder | reminderminutes | |
Start Date | startdate | |
Start Time | starttime | |
Status | status | |
Support Case | supportcase | Customer Support and Service |
Timed Event | timedevent | |
Title | title | |
Transaction | transaction | |
User Notes | usernotes |
Hello, I'm Tim Dietrich. I develop custom software for businesses that are running on NetSuite, including mobile apps, Web portals, Web APIs, and more.
I'm the developer of several popular NetSuite open source solutions, including the SuiteQL Query Tool, SuiteAPI, and more.
I founded SuiteStep, a NetSuite development studio, to provide custom software and AI solutions - and continue pushing the boundaries of what's possible on the NetSuite platform.
Copyright © 2025 Tim Dietrich.