Filtering Posting Date in Sales Invoice Header


How can i filter latest “Posting Date” in Sales Invoice Header.

Acutually my task is to restrict a sales order post function if the posting date of sales order is less than the latest posting date in the Posted Invoice.

Please helpme in getting this.

Thank U

set a key in Sales Invoice Header.

“posting date”


“sales invoice header”.setcurrentkey(“posting date”);

“sales invoice header”.findlast;

date := “sales invoice header”.“posting date” ;

You can use Allow Posting Date functionality of user setup…