Skip to main content
Answer

Is is a correct statement?

  • March 8, 2024
  • 4 replies
  • 65 views

Forum|alt.badge.img

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

Best answer by Vignesh Ponnusamy

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,

4 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

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,


Forum|alt.badge.img
  • Author
  • Freshman I
  • March 8, 2024

Thank you, Vignesh. that was helpful


Forum|alt.badge.img
  • Author
  • Freshman I
  • March 8, 2024

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


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

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.