NetSuite: Accessing Employee Emergency Contacts With SuiteQL

Published on March 23, 2021.

One of the functions of a custom NetSuite employee portal that I've been working on is the ability by authorized users to see an employee's emergency contacts. If you're not familiar with NetSuite's support for tracking emergency contacts, you can find the functionality by navigating to an employee record, clicking on the Humand Resources tab, and you should see an Emergency Contacts subtab. Here's an example.

Accessing the emergency contacts via SuiteQL is actually quite easy. The data is stored in a table named EmployeeEmergencyContact. Here's a query that returns the emergency contacts for a specified employee ID.

SELECT
	Contact,
	Relationship,
	Address,
	Phone
FROM
	EmployeeEmergencyContact
WHERE
	Employee = 786

You can also use join the EmployeeEmergencyContact and Employee tables to get the data needed to create an "emergency contacts directory." Here's what that query might look like.

SELECT
	Employee.ID AS EmployeeID,
	Employee.FirstName,
	Employee.LastName,
	Employee.Email,
	EmployeeEmergencyContact.Contact,
	EmployeeEmergencyContact.Relationship,
	EmployeeEmergencyContact.Address,
	EmployeeEmergencyContact.Phone
FROM
	Employee
	LEFT OUTER JOIN EmployeeEmergencyContact ON
		( EmployeeEmergencyContact.Employee = Employee.ID )
ORDER BY
	Employee.LastName,
	Employee.FirstName	

Have a question about this post, or about SuiteQL in general? Feel free to contact me.

About Me

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.