OnGlobalmodify

genericgeneric Member Posts: 511
Hello
On GlobalModify Trigger in CU 1 gets triggered when a user modifies a record.
Would it be possible to have globaltriggers when code modifies the record?

They would be called onGlobalCodeModify(recRef,xrecRef)


This would minimize a lot of customization solution centers and vertical solution centers.

Comments

  • DenSterDenSter Member Posts: 8,304
    generic wrote:
    This would minimize a lot of customization solution centers and vertical solution centers.
    Really? How do you figure that?
  • genericgeneric Member Posts: 511
    For example

    LS Retail doesn't have to modify every tables that it needs for replications.

    There are a lot of objects where Record.modify(true) is not called. and I've merged many vertical solution where they comment the //record.modify and add their they own code.

    Field Level security addon don't need to do the same modifications.


    Just like NA version as xtransfercustom fields CU, you can have the same feature for global modifications.
  • DenSterDenSter Member Posts: 8,304
    generic wrote:
    This would minimize a lot of customization solution centers and vertical solution centers.
    I still don't understand this point though. So there would be another place where you can write custom code, maybe even have easier access to a more global event. Still, if you need to modify the app, you still need to modify the app, doesn't matter where you write the code.
  • genericgeneric Member Posts: 511
    Yes but you are modifying less existing objects. Thus less objects to merge.
  • DenSterDenSter Member Posts: 8,304
    Right I see your point, yes it is easier to merge a function call than a whole bunch of code. Too bad that it is easier to add some code than to create an external function to call :mrgreen:. This is available now though, and still many add-ons are difficult to merge.
  • kinekine Member Posts: 12,562
    And it can be dangerous, because many people will focus on modifying this trigger instead the correct process like posting codeunit etc. when they need something, and it will mean that there will be many "hidden" code behind.

    E.g. some values/records are modified during posting - ok, I will check the posting codeunit for changes - nothing. Ah, the new trigger, let me see... ok, new call to one cryptic codeunit with big case analyzing what is modified/inserted and calling many functions in different cases. And wait, what if I added/modified the record not through the posting codeunit, but manually because I, as an partner, needed to correct something bad in the entries? Oh s..t, the trigger was called too!

    Take it as an example what can happen if... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.