Change log in dataport

sankarsankar Member Posts: 79
Hi Experts,

i have created one dataport for importing the vendor details. i need to enable the change log ,the details that i imported through data port.
how can i do the same ?

could you please advice.....
Everything is Possible

Comments

  • nunomaianunomaia Member Posts: 1,153
    When you save / change you enable triggers ?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • sankarsankar Member Posts: 79
    Hi,

    Thanks for the reply .. how can i do ? could you please explain ?
    Everything is Possible
  • remco_rauschremco_rausch Member Posts: 68
    I'm going to presume that you've done all the change log setup (specifiying what tables/fields to log)

    The change log functionality as standard is called after a record has been changed by either of the following triggers:
    insert(true)
    modify(true)
    delete(true)
    rename(true)

    If your dataport calls these triggers with a false then (i.e vendor.modify, vendor.insert) then no entries will be created in the change log entry table.
  • sankarsankar Member Posts: 79
    no i didn't setup the changes....
    i blankly created on dataport ...
    please tell me from the begginning i need to do .
    thanks in advance
    Everything is Possible
  • kinekine Member Posts: 12,562
    I'm going to presume that you've done all the change log setup (specifiying what tables/fields to log)

    The change log functionality as standard is called after a record has been changed by either of the following triggers:
    insert(true)
    modify(true)
    delete(true)
    rename(true)

    If your dataport calls these triggers with a false then (i.e vendor.modify, vendor.insert) then no entries will be created in the change log entry table.

    This is not true. ChangeLog catch just events fired by User input. Calling Insert(true) is not enough to run the change log.

    You need to call correct function from Change Log Management to catch the change manually. Something like in Codeunit 7111 in function InsertAnalysisLine:
    WITH AnalysisLine DO BEGIN
    INIT;
    "Line No." := AnalysisLineNo;
    AnalysisLineNo := AnalysisLineNo + 10000;
    Description := Text;
    Range := No;
    "Row Ref. No." := COPYSTR(No,1,MAXSTRLEN("Row Ref. No."));
    Type := Type2;
    Bold := Bold2;
    Indentation := Indent;
    INSERT(TRUE); //<Inserting the line
    RecRef.GETTABLE(AnalysisLine); //Creating RecRef for the record
    ChangeLogMgt.LogInsertion(RecRef); //Writing into Changelog
    END;
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • remco_rauschremco_rausch Member Posts: 68
    Oops my bad. I was working with the change log during the last week making it work when NAS is running, in the code NAS was running it wasn't calling modify(true) and I presumed (I know I shouldn't presume anything with Navision :) ) that it was that, that was causing the issue.

    Anyways I sorted it in the same way Kine suggested.
  • gisongison Member Posts: 128
    Hello Kine,
    Is it possible log change for new added table?
    because it seem to not work by this way.
    :?

    thank you.
  • kinekine Member Posts: 12,562
    It is working, but you need to enable it and restart NAV client after that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • gisongison Member Posts: 128
    Hey Kine,
    You are a good guy, help everyone and me all the times.
    I appreciate you. Thank you.

    :?
  • kinekine Member Posts: 12,562
    gison wrote:
    Hey Kine,
    You are a good guy, help everyone and me all the times.
    I appreciate you. Thank you.

    :?

    It means that problem is solved? 8)

    You are welcome...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.