Skip to main content
Question

Adding a custom field in INCOMING_INVOICE2

  • April 22, 2026
  • 2 replies
  • 33 views

Forum|alt.badge.img+9

Hello,

I am trying to add a custom field on the Supplier Invoices Analysis (Entity = IncomingInvoice, View = INCOMING_INVOICE2). 

The field I want to add is to display the most recent note added to the invoice using expression: INVOICE_NOTE_API.Get_Last_Notes(v.company, v.invoice_id).

The expression runs perfectly fine if I run it in a SQL tool. However once I add the field to the page I get this error: 

SupplierInvoicesAnalysis/List (server error)
Malformed Request.
Error details: [{"code":"EXPRESSION_PROPERTY_NOT_IN_TYPE","message":"The property 'Cf_Latest_Note', used in a query expression, is not defined in type 'IncomingInvoice'."}]

 

We are on Cloud 25.1.6. In our configuration IncomingInvoice is not in the excluded entity list. 

 

Can anyone help me understand why I am receiving that error.

 

Thanking you in advance!

2 replies

Tharshan SM
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • April 22, 2026

Hi ​@taenaren,

The issue is that if you look at the expression in the custom field it shows that it uses v.objkey to get the latest note, but if you check the entity details for IncomingInvoice it shows that rowkey is set to false, which means you cannot use objkey to retrieve the details. So instead of this you can pass a direct SQL query to fetch the data.

 

So maybe you can use something like that.

SELECT fnt.text
FROM   invoice_note inv
LEFT JOIN fin_note_text fnt ON inv.note_id = fnt.note_id
WHERE  inv.company    = :company
 AND    inv.invoice_id = :invoice_id

 

 

Regards


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • April 23, 2026

Thank you Tharshan. I will try that.