Skip to content

Instantly share code, notes, and snippets.

@lekker-solutions
Created May 19, 2022 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lekker-solutions/cde0f434d8e111e3a1b18eeb655d6e01 to your computer and use it in GitHub Desktop.
Save lekker-solutions/cde0f434d8e111e3a1b18eeb655d6e01 to your computer and use it in GitHub Desktop.
FBQL Translate
// For example, the following BQL Query:
PXSelectJoin<InventoryItem,
InnerJoin<SOLine, On<SOLine.inventoryID, Equal<InventoryItem.inventoryID>>>,
Where2<
Where<InventoryItem.itemClassID, Equal<Required<InventoryItem.itemClassID>>,
And<InventoryItem.inventoryCD, Equal<Required<InventoryItem.inventoryCD>>>>,
Or<SOLine.curyExtPrice, GreaterEqual<Required<SOLine.curyExtPrice>>>>>
// Becomes:
SelectFrom<InventoryItem>
.InnerJoin<SOLine>.On<SOLine.inventoryID.IsEqual<InventoryItem.inventoryID>>
.Where<Brackets<InventoryItem.itemClassID.IsEqual<@P.AsInt>
.And<InventoryItem.inventoryCD.IsEqual<@P.AsString>>>
.Or<SOLine.curyExtPrice.IsGreaterEqual<@P.AsDecimal>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment