writing to a field while opening a form

Hi,

I have a dilemma, but am sure this is something others also encountered. While opening a form, my code should look into another db to see if there is a value that needs updating. If so, the field in NAV will be updated.

1. I know this has performance issues but the custmer wants this to happen like this and a NAS service is out of the question sadly.
2. This is my first post, please be gentil :-)
3. I really need advice on how to enable this customer.


So OnActivate, I request a function that will result all the records that needed to be checked. In this function I call the function in the CU that will change the value and commit the change, but as you can guess, it results in the message "Transaciton needs to be started blablabla".

I know this is because I'm trying to start a write transaction in a trigger but can't I use a workaround?

Answers

  • NavNabNavNab Member Posts: 181
    In a standard database (W1), check form 118 (General Ledger Setup). OnOpenForm trigger inserts a default setup if it does not exists.

    I hope this will inspire you to find the right solution for your case.
  • JuhlJuhl Member Posts: 724
    If customer can approve, make a action instead to run your code, and also a progress window.
    Often they open the page more often than the check needs to be done.

    Take tecnical control when it comes to customers, help them make the right choices. This calls for NAS.
    Follow me on my blog juhl.blog
Sign In or Register to comment.