Object Save Trigger ???

liquid_dreamliquid_dream Member Posts: 8
Hi,

Is it possible to detect when is an object being saved?
I know that some triggers in Codeunit 1 are triggered when the Change Log Setup is Configured do record changes in the Object Table.
However those triggers seem to be run only when you change the fields directly in object design. When I open the object in design mode and then save it, no trigger is triggered.


Thx.
Miguel

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What I did to detect the changes was making a singleinstancecodeunit that compared the object table to a copy of that table with the same data, using a timertrigger.

    That was about 4 years ago the best idea I could come up with, maybe there are new ways with current versions.
  • liquid_dreamliquid_dream Member Posts: 8
    That's a nice idea but that way i cannot stop someone from saving the object. I have a table with object Ids and i need to block save changes to those objects.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Can't you do this with userroles? Just deny modify rights to these objects. Or will the usersetup get to complex that way?
  • liquid_dreamliquid_dream Member Posts: 8
    I can´t believe i didn´t think of that. (I feel stupid right know)
    Thx you just solved my problem. It's going to be a lot of work but it's solved. =D>
  • girish.joshigirish.joshi Member Posts: 407
    also, if you running sql, you can put some code in the Object table's triggers.
Sign In or Register to comment.