I want to leave a quick hint on how to use Const values in Acumatica for FBQL. Below goes sample:
public class someBranch : PX.Data.BQL.BqlInt.Constant<someBranch>
public someBranch() : base(48)
Then later on you can use it in your BQL and FBQL queries for filtering
Recnetly I had a need to create PXProjection and wanted to use in declaration of it not SelectJoin, but FBQL SelectFrom with combination of InnerJoin. Finally I've got something like this:
public class SalesOrderLines
Nothing fancy, but during initial coding error messages were a bit confusing
today I want to speak about one very interesting feature of FBQL, which I don't know if exists in BQL. Function Brackets!
Take a look on following code sample:
var bracketsDemo = SelectFrom<SOOrder>.InnerJoin<SOLine>.On<SOLine.orderNbr.IsEqual<SOOrder.orderNbr>>.InnerJoin<SOShipLine>
as you can see from the code, now in FBQL if you need to have Or operator, then as anohter option you may use Brackets.
today I want to describe how analogue to Required works in Acumatica Framework.
For example, in the past ( before 2019 R1 ) you may read something from Acumatica with help of Required:
var contact = PXSelect<Contact, Where<Contact.displayName, IsNotNull, And<Contact.displayName,
Contains<Required<Contact.displayName>>>>>.SelectWindowed(graph, startIdx, 1, ' ').First();
Now, you can use @P.AsString, as shown on code sample below:
var contact = SelectFrom<Contact>.Where<Contact.displayName.IsNotNull.And<Contact.displayName.
Contains<@P.AsString>>>.View.SelectWindowed(graph, startIdx, 1, ' ').First();
Also take a note, that FBQL looks a bit simpler then BQL which has plenty of <<<>>>>