Solved

Is is a correct statement?

  • 8 March 2024
  • 4 replies
  • 49 views

Userlevel 1

Is it correct to filter on ARInvoice using a statement like : 
Where<ARInvoice.status.IsEqual<"Closed">>
?

icon

Best answer by Vignesh Ponnusamy 8 March 2024, 21:56

View original

4 replies

Userlevel 7
Badge +4

Hey @hmzamr,

From a quick check I think the termsID is being fetched from the database. To be able to use a constant value you can create a BQL field, set the required value and use it the query. Below is an example, 

public class custPrefix : PX.Data.BQL.BqlString.Constant<custPrefix>
{
public custPrefix() : base("%500%") { }
}

Note: User the Bql data format similar to the TermID. Hope that helps.! Feel free to post back if you have any questions. 

Userlevel 1

what about ARInvoice Terms? is there any class in which the terms are defined?

Userlevel 1

Thank you, Vignesh. that was helpful

Userlevel 7
Badge +4

Hi @hmzamr,

You cannot use string like that, instead reuse the constant defined in the existing ARDocStatus class.  Example below,

Where<ARInvoice.status.IsEqual<ARDocStatus.closed>

Good Luck,

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved