Hi expert ,
Can any one give me any document from which i can know that which tables are used which codeunit ? I want to write my code for main tain a update flag for (Items / Customer / Shipping Address / Sales Price / Sales line Discount ) tables which will be Inserted / Updated?
Thanks in Advance
Surajit
*This post is locked for comments
Hi Surajit,
in addition to the answers already given (especially Ben's), please be aware that there is a major difference what the cause of the modification is. If anything is entererd by GUI and the normal table triggers are used, then you have several options, where putting the code into the OnInsert/OnModify/OnDelete trigger of the table might be feasible. However, when the changes are done by code (running an update batch, an xmlport without using modify(true), various other possible sources), then you have only one trigger inside NAV: The OnDatabaseInsert/Modify/Delete functions in CU 1. But as Ben said, be careful, this can have a major impact on performance.
with best regards
Jens
You need to use Object Manager tool of Idyn.
Google it.you will find more info.
Run the Debugger, and see what you are looking for. All of them you are looking for is there.
So you want to log values un a third-party table each time data is Inserted / Modified in a NAV table like Item, Customers, Shipping addresses etc?
Then you just need to put your code in the OnInsert / OnModify trigger of each Table.
Each table in NAV has OnModify/OnInsert/OnDelete trigger.
If you want to log for a specific field then you need to put your code in the OnValidate trigger of that field.
If you want to create kind of more generic logging system then you can analyze the CodeUnit 1 ApplicationManagement which contains more global triggers like OnDatabaseInsert for example which is fired each time something is inserted regardless of the table. (but be careful as it is a core codeuinit of Nav and each change should be thouroughly analyzed)
Regards,
Hi expert ,
Please give me a suggestion .
thanks
Surajit
Hi Benoit ,
Thanks for the reply . Actually I have maintain a udf column ('UpdateFlag') for those above tables . I want to update this flag by 'F' value when data are inserted /Updated in above those tables . I have write code for example of item table :
Item.GET("Item No.");
Item.UpdateFlag := 'F';
Item.MODIFY;
But I can't understand where the above code is placed for the above those tables.Have you any document where I can see which tables(Items / Customer / Shipping Address / Sales Price / Sales line Discount ) use codeunit for Insert/Update ?
Thanks
Surajit
Hi,
If the purpose is to have a log of insertions, deletions & modifications you can easily set it up from the Change Log Setup page.
Hope it helps...
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156