how to select all fields in change log setup using code

abhi1901abhi1901 Member Posts: 102
Hey,

I am trying to activate change log setup (Tables).
There are large no of tables.
So can anyone suggest me the code for selecting All Fields in all tables.
I have tried but it uses temporary table so facing problem.

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    There is a function called UpdateRec() in form 593..please check
    also check how all tables are inserted into tempt table using SetSource() function..

    similarly insert tables in table 403 and update..
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Change Log is not designed to log the whole database changes. It's a tool to detect changes to single fields/tables that are very important to your current installation. If you want to log the whole database I would suggest to use another tool.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Yes, I agree too..
    it will affect performance alot..
  • abhi1901abhi1901 Member Posts: 102
    Thanks.
    But for every table I have to select 'Log Insertion', 'Log Modification','Log Deletion' to All Fields.
    I consume large amount of time.So want a code to do so.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Yes, I agree too..
    it will affect performance alot..

    Then why do you give advise to someone on how to do something that they shouldn't do. :?:
    David Singleton
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    because some users wont mind whatever the affect is..they just need the solution..
    abhi1901 wrote:
    But for every table I have to select 'Log Insertion', 'Log Modification','Log Deletion' to All Fields.
    I consume large amount of time.So want a code to do so.

    [-(
  • David_SingletonDavid_Singleton Member Posts: 5,479
    because some users wont mind whatever the affect is..they just need the solution..

    So here is a blog for you .... and your customers ....



    http://dynamicsuser.net/blogs/singleton ... ltant.aspx
    David Singleton
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    So here is a blog for you ....
    Thanks..I don't require this :thumbsdown:
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I want to get a certain area very plain. How do I get an atomic bomb?

    Oh, you shouldn't use atomic bombs because they will also erase all kind of life.

    But I need it.

    Ok, here it is.

    :roll: :roll: :roll:
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • David_SingletonDavid_Singleton Member Posts: 5,479
    I want to get a certain area very plain. How do I get an atomic bomb?

    Oh, you should use atomic bombs because they will also erase all kind of life.

    But I need it.

    Ok, here it is.

    :roll: :roll: :roll:

    Very good analogy. :thumbsup:
    David Singleton
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    No one wants to tell you or your customers how to live their lifes. It's just a bad suggestion to use Change Log for each and every field. I thought you are experienced enough to understand that. But now I see it doesn't make sense to discuss such things with you at the moment. :|
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    It's just a bad suggestion to use Change Log for each and every field.

    I already agreed with your first post only..
    Yes, I agree too..
    it will affect performance alot..
    No one wants to tell you or your customers how to live their lifes.
    Read the posts clearly..you will understand...
    I thought you are experienced enough to understand that. But now I see it doesn't make sense to discuss such things with you at the moment. :|
    I am feeling the same too :lol:
  • abhi1901abhi1901 Member Posts: 102
    I know all this stuff.
    but the problem is that we dont know but some one has deleted our database. It has happened 2-3 times in 2 months.
    Many times we faced problem line some one has deleted Item or Item ledger entry or posted invoice or bank payment , etc for some documents.
    That's why we have to do it.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Only very, very limited number of users should have the right to delete databases. :!: In case of you give the credentials of your admin account to any user you won't be able to indentify the user by Change Log.
    Master data (e.g. items) can't be deleted if there are already Ledger Entries related to it.
    Ledger Entries can't be deleted with customer license, you need a developer license.
    Posted Invoices of course can be deleted, but the Ledger Entries in background will remain. This can be solved by user rights.

    Your problem can't be solved by Change Log. You possibly will only be able to indentify where it is coming from. You need well defined user rights setup as well as better and restrictive security guidelines. :!:
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    Ok, so you want to store in the database who deletes the database?
    Just remember that the information that tells you who deleted the database will be deleted too when the database is deleted.

    Furthermore, the Change log does not capture all modifications made to the tables.

    I think you should look at setting up proper security and only very senior people should be allowed to have the right to delete a database!
    The system permission 1550: File, Database, Delete should only be assigned to a very select group of users!
    I would start by removing that permission from everyone.

    I hope this helps,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • abhi1901abhi1901 Member Posts: 102
    Thanks for all ur help
Sign In or Register to comment.