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 ?
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.
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;
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.
Comments
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Thanks for the reply .. how can i do ? could you please explain ?
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.
i blankly created on dataport ...
please tell me from the begginning i need to do .
thanks in advance
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:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Anyways I sorted it in the same way Kine suggested.
Is it possible log change for new added table?
because it seem to not work by this way.
:?
thank you.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.