Company I work for will stop using NetSuite for al...
# general
j
Company I work for will stop using NetSuite for all HR operations and one of them being Payroll. We need to save all paystubs ever created in NetSuite for all current and previous employees? Has anyone done this before?
t
@JC It is possible to get to the payroll data via SuiteQL. Here's a query that I am using to do that in a custom employee portal. It might help. Let me know if you have any questions about it.
💯 1
Copy code
SELECT
	PayCheck.ID,
	PayCheck.TranDate,
	PayCheck.BatchNumber,
	PayCheck.TranID AS CheckNumber,
	Paycheck.Entity,
	PayCheck.ChkAmount,
	PayCheck.Location AS LocationID,
	Location.Name AS LocationName,
	Employee.ID AS EmployeeID,
	Employee.FirstName,
	Employee.LastName,
	Employee.Email,
	BUILTIN.DF( PayCheckSummary.ItemCategory ) AS ItemCategory,
	BUILTIN.DF( PayCheckSummary.PayItem ) AS PayItem,
	BUILTIN.DF( PayCheckSummary.PayItemType ) AS PayItemType,
	PayCheckSummary.Value,
	PayCheckSummary.Amount
FROM
	Paycheck	
	INNER JOIN Employee ON
		( Employee.ID = Paycheck.Entity )
	INNER JOIN Location ON
		( Location.ID = PayCheck.Location )	
	INNER JOIN PayCheckSummary ON
		( PayCheckSummary.Paycheck = Paycheck.ID )		
WHERE
	( Paycheck.Entity = 9999 )
	-- AND ( PayCheck.TranDate BETWEEN TO_DATE( '2020-01-01', 'YYYY-MM-DD' ) AND TO_DATE( '2020-12-31', 'YYYY-MM-DD' ) )
ORDER BY
	PayCheck.TranDate
j
@tdietrich Thank you. I'll try this
t
👍