How to count recods of the lineItems in INVOICES.

  • 88 Views
  • Last Post 21 June 2019
javsuc posted this 19 June 2019

I need to count how many line-items a invoice have.

That way I can treat that document as Exception, in case line-intems counter = 0.

Thanks.

Mattkitchen posted this 21 June 2019

Hi javsuc,

Please try the following script:

if(Document.HasField("Invoice Layout\\LineItems"))

   int count = Document.Field("Invoice Layout\\LineItems").Items.Count;

 

Close