Skip to main content
Answer

How can I filter most recent Sales Order in a Generic Inquiry

  • September 25, 2023
  • 9 replies
  • 148 views

I have a generic inquiry to show all sales orders lines, but now I want to modify this to retrieve only most recent sales order’s SO Lines. How can I do that?

Best answer by Naveen Boga

In the Generic Inquiry, we have the SELECT TOP field, you can select 1 there and check.  @charithalakshan49 

 

 

9 replies

Manikanta Dhulipudi
Captain II
Forum|alt.badge.img+15

Hi @charitha82 

You can filter the GI with a date filter to get the sales order lines as needed.

Thanks


Forum|alt.badge.img+1

@manikantad18  Thanks for the response, However, Actually I am feeding that GI data into a Pivot table. So I can not do that manually by using such kind of filter.  Is there any way to add a condition in the GI to get SO lines from most recent SO? 


dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • September 25, 2023

You can specify this in the conditions

So if you wanted the last 7 days you could put in the value @Today - 7 which is simple. You can also get more complicated using DateAdd/Date Diff etc.

 


Forum|alt.badge.img+1

@dcomerford I don’t want to consider a date range, I just wanted to retrieve last SO only(The most recent SO in the system)


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • September 25, 2023

@charithalakshan49  In the SORT ORDER tab, please select the SOOrder.CreatedDateTime and Select the Descending, so that GI will be shown the latest orders first.


Forum|alt.badge.img+1

@Naveen Boga Hi, yes I can do like that but it shows other SO as well. But I want to get only the latest one. just one SO.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • September 25, 2023

In the Generic Inquiry, we have the SELECT TOP field, you can select 1 there and check.  @charithalakshan49 

 

 


Forum|alt.badge.img+1

@Naveen Boga Thank you. It worked!


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • September 25, 2023

Great @charithalakshan49  Thanks for sharing the update.