Hi all,
I want to print the Sales Orders that are created or modified from today back to 2 weeks or 2 months. It means that there are many Sale orders, we need to see the list daily. So if we have some order that are created today we will print them and not only them old orders that were changed or modified today we will also list them.
Using the change log table is the first options, searching and comparison if it is not matched, we will skip this SO. But this way is so slow because i write on the OnAfterGetRecords trigger to check.
Anybody have a better way to solve with this case?
If i do not want to use Change Log Table, another solution?
I just think about adding new field to manage the changes on the Sales Header. Any changes happened on S.Header or Lines will be updated to this field. This field is the date ( can call it Last date modified on Customer Card). Is it good way??
Thanks,
0
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
"Sales Header" Table
OnModify()
"Last Modified Date" := WORKDATE;
"Sales Line" Table
OnModify()
SalesHeader.GET("Document Type","Document No.);
SalesHeader."Last Modified Date" := WORKDATE;
SalesHeader.MODIFY;
If this is what you want or need then why haven't you done it yet?
Are their other parameters that need to be accounted for to update this date?
How about on modify clearing the "picking ticket" date (is that what you mean by "Printing"?)
then all orders without a pick creation date need to be printed.
a simple filter of "Pick Creation Date" = ''
http://www.BiloBeauty.com
http://www.autismspeaks.org
Because i don't have developer license to do that. I was a NAV developer before, now i work as consultant with customer who are using NAV. I know how to write code but my company's license can not access code in the table,form, codunit.
I just want to know what are new Orders and what are the changed Order in the time frame.
If i based on the change log table, i do comparison Sales Order with filtered list of Change Log table (Change Log filtered by Date, table no : 36,37). this way is not good, new field on the Sales Order is better. It makes more speed for filtering and can sort Orders by date easier.
Thanks for your comments.