How to connect invoices to projects using SuiteQl

I am attempting to use SuiteQl to retrieve invoice information together with what project that invoice is connected to.

If I look at the invoice through the NetSuite web site, what project the invoice is linked to is clearly shown in the primary information for the invoice.

What I cannot figure out is how to use SuiteQl to retrieve the invoice and what project it is connected to. I can find the relevant transaction and transactionline records. I can find the project in the NetSuite job table. The records catalog suggest that the entity field can be used to join to the project, but that does not work. The entity field from transaction and transactionline lead to the customer.

What am I missing?

Rookie Asked on November 14, 2024 in How To's.
Add Comment
6 Answer(s)

Hi,

Typically entity fields will store wither Customer or Job.

Do you see the project set in the UI? Is it in the standard field or perhaps a custom field?

Thanks,

Chris

Advanced Answered on November 15, 2024.
Add Comment

Chris,

I see the project set in the UI.

I don’t think I know NetSuite well enough to answer whether this is a standard or custom field. I have examined all fields and their values from transaction and transactionLine. I do not see anything that looks like a connection to job.

Gary

Rookie Answered on November 15, 2024.
Add Comment

One thing I sometimes try is getting all (*) the fields and then searching for the Internal ID. Do you see anything if you do that?

Also, try Setup > Records Catalog which may help as you can search for fields, etc.

Advanced Answered on November 15, 2024.
Add Comment

Chris,

I have tried getting all fields and searching for the ID.  I have examined the record catalog.

Neither of those things has led me to discover how invoices and projects are connected.

I have also used the rest api to retrieve invoices. In the data returned there, the connection from invoice to project is present. However, using this api one invoice at a time is not practical. I am looking for a SuiteQL solution.

Gary

Rookie Answered on November 15, 2024.
Add Comment

I can confirm that this gives me the project set on the transaction line:


SELECT transactionline.entity FROM transactionline WHERE transactionline.mainline = 'F' AND transactionline.taxline = 'F'

If you are runnign this through REST Web Services, have you checked permissions?

Thanks,

Chris

Advanced Answered on November 15, 2024.
Add Comment

Chris,

I see the error of my ways. I was focused on transaction lines where mainline = ‘T’.

Thanks for your help.

Gary

Rookie Answered on November 15, 2024.

Glad you’ve got it sorted!

on November 17, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor