Options

Want to determine any changes in SO without using Change log

S0918423470S0918423470 Member Posts: 159
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,

Answers

  • Options
    kinekine Member Posts: 12,562
    May be the right question is: why you need that? Is there another way how to solve the main reason?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    aseigleaseigle Member Posts: 207
    not sure which version you are on, but take a look at the archiving functionality. It might be a jumping off point for what you are looking for. It will keep track of changes that are made, but requires the user to "archive" it. You might be able to automate that process, and then find any orders where No. of archived versions <> 0.
  • Options
    SavatageSavatage Member Posts: 7,142
    Sounds like you wants to add a new field to the sales header called "Last Modified Date" type date

    "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" = ''
  • Options
    S0918423470S0918423470 Member Posts: 159
    Savatage wrote:
    Sounds like you wants to add a new field to the sales header called "Last Modified Date" type date

    "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" = ''

    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.
Sign In or Register to comment.