Contents tagged with Search
recently friend of mine gave me wonderful question:
In PXSelect command, I saw Search, Search2, Search3… keywords, please explain the difference.
Thats really good question which shows his attentiveness to details.
So, no let's go part by part.
First of all, Search statement can be applied to those kinds of attributes: PXSelector, PXDbScalar and PXDefault.
Also you can apply Search statement to cases when you updated something in cache of Acumatica and what to reopen that part. It can look like this:
or like this:
Don' … more
today I want to share one trick which can save you few lines of code.
Imagine case: you created graph, and want to read something from db, and then set current property of that graph view to some value. How to do it in one line? The anser is simple, with help of Search<>
For example it can be like this:
public PXSelectOrderBy<SalesOrder, OrderBy<Asc<SalesOrder.orderNbr>>> Orders;
graph.Orders.Current = graph.Orders.Search<SalesOrder.orderNbr>(order.OrderNbr); more