I wanted to change a PXSelector attribute on a DAC field to Fluent BQL syntax if possible in order to include a subquery. Is there any way to do a Fluent BQL equivalent of PXSelector that you know of?
Solved
Is there any way to do a Fluent BQL equivalent of PXSelectorAttribute?
Best answer by Leonardo Justiniano
Hi
😄 I rushed to give you the missing piece. Here is an example extracted from Acumatica itself
// INItemClass.cs
[PXSelector(typeof(SearchFor<CSAttributeGroup.attributeID>.
Where<CSAttributeGroup.entityClassID.
IsEqual<PX.Data.BQL.RTrim<Use<itemClassID.FromCurrent>.AsString>>.
And<CSAttributeGroup.entityType.IsEqual<Common.Constants.DACName<InventoryItem>>>.
And<CSAttributeGroup.attributeCategory.
IsEqual<CSAttributeGroup.attributeCategory.variant>>.
And<CSAttributeGroup.attributeID.
IsNotEqual<defaultRowMatrixAttributeID.FromCurrent>.
Or<defaultRowMatrixAttributeID.FromCurrent.IsNull>>>),
typeof(CSAttributeGroup.attributeID),
DescriptionField = typeof(CSAttributeGroup.description))]
You can do your complex query using FBQL. However, I have had some weird behaviors in the past. I think last versions of Acumatica have fixed it. Give it a try.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.