Search Query in Suite CRM - to get Invoice/Contracts/Quote Line Items

What are you trying to achieve?

Subject: Help Needed: Accessing Invoice/Contracts/Quote Line Items in SuiteCRM

Hello everyone! :blush:

I’m trying to retrieve Invoice/Contracts/Quote Line Items using the “Search for Objects” module in SuiteCRM, but I’m having a bit of trouble and haven’t found much guidance in the documentation or forum.

ChatGPT suggested I use the following query:

aos_products_invoices.parent_id = 'c014521a-e038-2348-b88d-677a8fdecafc' AND aos_products_invoices.parent_type = 'AOS_Invoices'

However, I’m encountering this error:

RuntimeError: Access Denied [40]: You do not have access

Origin: SuiteCRM 7

Has anyone experienced this issue before? Any help or advice would be greatly appreciated!

Thank you in advance! :blush:

Did you checked the user role permissions?

I’m admin
I’m not an expert in suite CRM but the user is configured like this:

So am I.
But what I can see from the provided screenshot that you don’t have any user role defined.
It should be a role that grants you an API access and then you should to configure an object that you would like to access as well.
Try to ask ChatGPT how to do it

I set Admin role of owner and granted permissions to invoices and products, still same error :frowning:

That’s what I found:

If the user interacts with SuiteCRM via the API:

  • Ensure the API User or Integration User roles are enabled for this account.
  • Confirm that the Access API checkbox is checked for this user in their profile settings.