automatically transfer data from one table to another table

vyankuvyanku Member Posts: 791
Can we transfer some fields from one table to another table after perticular interval or on perticular date automatically?
(Like if there are vendor having different date of birth
If there today's date is the date of birth of any vendor that vendor will transfer into perticular table automatically)

Comments

  • MbadMbad Member Posts: 344
    Can be done in CU1 if needs be, although its not the prettiest thing to do, since it will be run on every client startup. Could attach it to user setup so its not run every time.
  • vyankuvyanku Member Posts: 791
    Can be done in CU1 if needs be, although its not the prettiest thing to do, since it will be run on every client startup. Could attach it to user setup so its not run every time.

    What do u mean by CU1?
  • RkoRko Member Posts: 24
    Hi,

    you can use NAS to do this.
    Navision Developer and Consultant
  • vyankuvyanku Member Posts: 791
    you can use NAS to do this.

    [I think] :-k NAS is for other application, to enteract data between navision and other application.How it will help me to transfer data within navision tables.
    Is there any other method??? ](*,) :-k
  • RkoRko Member Posts: 24
    Hi,

    you can use for transfer within Navision itself as well. You can schedule time for automaticaly run some report or codeunti where you will have your transfer code for transfer datas between tables with condition what ever you like.
    I think is very good solution, once run and then you can just relax :) :whistle:
    Navision Developer and Consultant
  • RkoRko Member Posts: 24
    Hi, we have similar solution for tranfer datas between countries from one navision to another navision, but some countries are just different companies in one Navision and its work very well.
    Navision Developer and Consultant
  • vyankuvyanku Member Posts: 791
    Ok,
    But our client dont have NAS license. :-k

    Will u please explain......
  • RkoRko Member Posts: 24
    When we had not NAS once i used form which was something like scheduler. Just add some code to OnTimer trigger and set TimerInterval in form properties and you have very simple scheduler for running repeated jobs.
    Then just link to your transfer report or just function and run this form and it will be function. This is not very nice solution you have to have run this form all the time somewhere on server.
    Navision Developer and Consultant
  • vyankuvyanku Member Posts: 791
    OK
    But I want to transfer data not on the basis of time but on the basis of date.
  • RkoRko Member Posts: 24
    if datdate = TODAY then run else skip
    Navision Developer and Consultant
  • MbadMbad Member Posts: 344
    Both NAS and scheduler cost money and the CU1 solution is free(save development costs).
  • kinekine Member Posts: 12,562
    Still, I am missing the "why" to do that. If you have some process you need to run over such a records, you can run it directly over the original table just with appropriate filters.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Soft_TodSoft_Tod Member Posts: 43
    Hi all.
    Both NAS and scheduler cost money and the CU1 solution is free(save development costs).

    As far as I know is one NAS session ALWAYS free and usually already available in the customers licens.

    The use of NAS vs. only CU1 (which needs to be adjusted anywhichof these2ways you choose) reduce the job to be done of only one user (NAS). Though it seems a bit too much development work for what you want.

    If it really has to be an automatic Job, I would go for a Report which is Called from the CU1 when any User logs on. If necessary it could save a Datetime when last run, I dont see why though as with the proper Keys it'll be through in notime and it sholdn't matter that the Report is run by all Users.
    It is impossible to make anything foolproof, because fools are so ingenious.
  • kinekine Member Posts: 12,562
    Not always, just for new licenses since v 3.10 or 3.60 (I do not know exactly). But not for old original 2.60 and older.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Soft_TodSoft_Tod Member Posts: 43
    kine wrote:
    Not always, just for new licenses since v 3.10 or 3.60 (I do not know exactly). But not for old original 2.60 and older.

    Pulling my leg now do you :) If not I desperately want a Navison-version before 2.65 that can handle single instance codeunits lol

    Cheers
    It is impossible to make anything foolproof, because fools are so ingenious.
  • kinekine Member Posts: 12,562
    For example, this is part of one 2.60 license file:
    Maximum No. of Sessions
    Total....................: 21
    Any......................: 21
    Maximum No. of satellites..: 0

    after this customer bought the NAS session and some user sessions:
    Maximum No. of Sessions
    Total....................: 37
    Any......................: 36
    Application Server.......: 1
    Maximum No. of satellites..: 0

    I know that the one free NAS session is part of the license since the granule 1010 Foundation Layer was included. But may be ther was some local difference, I do not know.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,307
    Soft Tod wrote:
    I desperately want a Navison-version before 2.65 that can handle single instance codeunits
    You don't need NAS to run single instance codeunits. Codeunit 1 is a single instance coduenit for instance.
  • DenSterDenSter Member Posts: 8,307
    vyanku wrote:
    [I think] :-k NAS is for other application, to enteract data between navision and other application
    No that is not what NAS is for. It can be used for that purpose, but it is not that complicated.

    Navision Application Server is a Navision client session without a user interface, that can run as a Windows Service. That is all there is to it.

    The only real limitation is that you can't run any forms or dataports, or any other process that requires user interaction. So if you have a process that has a confirmation message that you want to automate, you will have to program that process to be able to handle no user interaction, like a default value in some setup, or a hard coded default value.

    Read the documentation on the product CD, in the Doc folder there's a pdf called w1w1atas or something that will explain how to set it up.
  • Soft_TodSoft_Tod Member Posts: 43
    DenSter wrote:
    You don't need NAS to run single instance codeunits. Codeunit 1 is a single instance coduenit for instance.

    It's true that you don't have NAS to run single instance codeunits. It can as well be done from a central codeunit like the CU1 or manually. But to implement NAS as a background service, it's the back bone.

    The clue with a single instance codeunit (introduced in v 2.65) is that it's unloaded only when the user close his session. This behaviour allows this particular Codeunit to react to events from Automation objects. F.ex. a timer tick as so often used in applications using NAS.

    Codeunit 1 on the other hand is not defined as a single instance codeunit, it's more used like a central entry point for any internal/external access to global/customisable functions, which are accessed directly by ID and not by name.

    Best Regards
    It is impossible to make anything foolproof, because fools are so ingenious.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    vyanku wrote:
    Can we transfer some fields from one table to another table after perticular interval or on perticular date automatically?
    (Like if there are vendor having different date of birth
    If there today's date is the date of birth of any vendor that vendor will transfer into perticular table automatically)

    You (and everyone replying) are looking at this from the wrong direction. You are trying to move data into a new table on a specific date. If you were saying you wanted to populate and post a journal or something similar, I could maybe see what you are doing. But in you example, it looks like you are trying to be able to have a list through a table of Vendors that have a birthday today.

    This just not how it is done in Navision. Instead you have a form that when opened, sorts and filters the Vendor table by birth date, and shows only those records.

    Rather than explain how you want to solve the problem, why not explain what the problem is and we can give you help with a solution.
    David Singleton
  • DenSterDenSter Member Posts: 8,307
    Soft Tod wrote:
    DenSter wrote:
    You don't need NAS to run single instance codeunits. Codeunit 1 is a single instance coduenit for instance.
    Codeunit 1 on the other hand is not defined as a single instance codeunit
    You're right, I stand corrected, I was sure that it was a single instance codeunit :mrgreen: that must have been a customization I saw once a very long time ago, and assumed that it was standard. You learn something new every day :mrgreen:
Sign In or Register to comment.