%MyCustomer% Dynamic Variable

jwilderjwilder Member Posts: 263
edited 2015-06-18 in NAV Three Tier
This is information on the %MyCustomer% Dynamic Variable (and more) in NAV 2015 (possibly earlier versions as well). Worth reading...

https://www.navug.com/blogs/jason-wilder/2015/04/07/jays-nav-stuff

Comments

  • aseigleaseigle Member Posts: 207
    Hi Jason,

    Just wanted to say the link you provided was super helpful. Will definitely be using those text variables in the future. Hopefully others will see it too!

    Adam
  • BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    Apologies for keeping this as a secret... I have notified our documentation people.

    When we made this, we especially were looking at making it easy to make meaningful saved views, e.g. go to a list of entries, customers or something else, enter some of these new filters, e.g. Date Filter = '%TODAY - 14D..%TODAY' and click 'Save View As...' and then name it someting like 'Sales last two weeks'.
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • jwilderjwilder Member Posts: 263
    Wow, I didn't realize you could do dateformula's as well. Adding it to the blog.

    The one missing piece is that a user cannot schedule a recurring report since there is code to specifically block this. I have remove the 2 lines of code on table Table 472 "Job Queue Entry" Function SetRecurringField so a user can now make a report recurring. Any idea why that code is there?
  • aseigleaseigle Member Posts: 207
    I agree that allowing users to schedule recurring reports is critical.

    What good is there setting up a schedule for a report to be run after hours (like Adjust Cost Item Entries) if I have to schedule it every day.

    The flip side is you can just go to the Job Queue entries and set it up there, and it will go to the report inbox of which ever user created the card.

    The last piece missing for this puzzle is to be able to add an e-mail address to automatically email the report via whatever format was selected. :-)

    Adam
  • BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    @aseigle: Small correction: You should only specify the first %, e.g. %TODAY to indicate that the following text (e.g. TODAY) should be parsed in codeunit 1 (which calls codeunit 41).
    This feature is a mix of platform and app: The client recognizes the %-pattern and calls codeunit 1 to get it translated by the app, and, as you have noticed, the client actually stores the user entry, i.e. the %-expressions.
    Note also, that we try to match against both the English word (e.g. TODAY) and the translated word, (e.g. OGGI if this is how it is translated in Italy). So, if you expect to change client language in between entering the filters and actually running them, you might consider entering them in English, otherwise use the translated ones.

    As for the Job Queue and recurrence... We know - also the actual specification of recurrence. We currently have a technical limitation that requires us to start a user session when the job is 'Scheduled' from running the report, and once it is time for the job/report to run, that session starts executing the job. This is to ensure that the job is executed in context of the correct user. What we really wanted to do, if we could, would be to have the Job Queue / NAS to start a session in a given user's context.
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • Rob_HansenRob_Hansen Member Posts: 296
    This is fantastic info and an area we have a keen interest in. We have an add-on for NAV that provides these sorts of dynamic filters for reports, and also provides some of the other functionality in this thread (recurring scheduled reports, setting scheduled reports for distribution by email or to report inboxes, etc.). I'm not trying to blatantly sell our product here (we will be getting set up as a site sponsor to promote it properly) but I did want to pass along the info as it's very relevant to some of the discussion above. Product details are at http://dynamicspath.com/products/reportpath/. Honestly, I think it's a structure that should be in NAV out of the box.

    I wasn't aware of the capabilities above for list/page filtering, so that's great to learn. We had been looking at potential ways to extend ReportPath to work with lists, but there's no need. :)
Sign In or Register to comment.