writing code via function?

redStripe
redStripe Member Posts: 83
Hello,
do anybody know if it's possible to write code in a special
table and a special trigger after i pressed a button or something?
e.g. Table: 23 Trigger: OnInsert Code to write after an event: messagebox('test')

I hope you know what i mean.

Thanks.

RedStripe

Answers

  • jhoek
    jhoek Member Posts: 216
    If you mean changing the application's logic at run-time: no, I'm afraid not. Nor would I personally consider it very likely that this will change in the near future.
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • DenSter
    DenSter Member Posts: 8,307
    Why would you want to write code to write code? Do you have anything specific in mind?
  • redStripe
    redStripe Member Posts: 83
    I'm looking for a way to get an event if something in a table is
    modified. I thought of writing code in the onModify-Trigger in the
    specific table during run-time.
    First I tried the onGlobalModify Trigger in CU1 but it does not work,
    my code was not executed...
    Is it possible to make changes in CU1? If yes - why Navision ignored my
    code, although the onGlobalTrigger was fired???

    RedStripe
  • mkessler
    mkessler Member Posts: 6
    A few months ahead i did think about same. Can't remember the reason for but i really had need of. I did some small tests but haven't got it work so i gave up and did finally find another solution. Slower and more code but it works.

    Anyway u can do some code into CU 1 and it will be done.
    I downloaded a tool here on mibuso and looked how it works.
    Inside the tool there was some code in CU 1 in the LogInStart() Trigger.
    The user who coded it did say a few words about. One thing i remember that he said the code must be after the orginal code.

    If this don't work in ur trigger u want it to work then maybe the trigger is not designed for use it in this way u want. I didn't look much into CU 1 so i don't know all possible and avalible Triggers but maybe try another trigger?!
  • jm
    jm Member Posts: 156
    redStripe wrote:
    Is it possible to make changes in CU1? If yes - why Navision ignored my
    code, although the onGlobalTrigger was fired???

    RedStripe

    Did you logout and login after changing CU 1?
    If not, try it again.

    br
    Josef Metz
    br
    Josef Metz
  • redStripe
    redStripe Member Posts: 83
    it works now :-)

    ...i wrote my code after the original code and i did a new login.

    DANKE!
  • Luc_VanDyck
    Luc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Maybe you can add "[SOLVED]" to your original Topic Subject, so others now this topic has a solution? See also Suggestion: Use [SOLVED] in Topic Title
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)