How To Set Current Record In Acumatica

How to set current record in Acumatica

Hello everybody,

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);

No Comments

Add a Comment
Comments are closed