Ghost table messages

dulamandulaman Member Posts: 73
Hi,

Two weeks ago I inserted a small routine that sends me an e-mail each time a new record is inserted in the table 99008502 (Inbound Purch. Document Header). After all that time, I didn't receive anything, until yesterday. Then, I modified the code so the receivers and the text of the message would be different.

But... I am still receiving the old text, and the receivers of the e-mail are the very same than before! :shock:

I have checked again the code, it is only two lines, no possible error there. Also, there is no other part of the database from where I am sending the very same message.

To do it even weirder, I inserted the same code (w/ a different message) in the table 36, and then I started to receive messages without problem from the first moment.

Can anyone explain what is going wrong? I am sure I am missing something, but cannot figure out what! :-k
-- dulaman
"I don't want to believe. I want to know." (Carl Sagan)

Answers

  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    There could be several explanations:
    First, are your email messages sent using the NAS?
    If it is then it could be you didn't restart the NAS after making the change.

    Secondly, are you using the Change Log to track the changes to your tables? If so, remember that the change log code only gets executed when the change is made through a form and not through code.

    And the last explanation could be, the OnInsert trigger on a table is only executed when the change happens in a form or if in code the command "table.INSERT(TRUE)" is used.

    Hopes this helps,

    Regards

    Willy (Former Mierlonaar 8) )
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • dulamandulaman Member Posts: 73
    Hi KYDutchie, and thanks for your reaction.

    Regarding your questions...

    are your email messages sent using the NAS?

    Nope. Anyway, I restarted several times all the services, even those non related. And this wouldn't explain the fact that if I modify the code in the table 36, then I have an immediate change in the text of the e-mails I am receiving. The issue is with table number 99008502 but everything goes well with the table 36.

    are you using the Change Log to track the changes to your tables?

    Yes, but what's the difference? I mean, I don't mind about keeping track of the changes in this table...

    the OnInsert trigger on a table is only executed when the change happens in a form or if in code the command "table.INSERT(TRUE)" is used.

    Yep, that would be the best explanation, but I am already receiving messages, so the issue is not there. The problem is that I seem to have no control over this specific table... I modified the content of the message that is sent, but the text sent is still the old one, as if I had not modified it at all.
    -- dulaman
    "I don't want to believe. I want to know." (Carl Sagan)
  • ebsoftebsoft Member Posts: 81
    dulaman wrote:
    Yep, that would be the best explanation, but I am already receiving messages, so the issue is not there. The problem is that I seem to have no control over this specific table... I modified the content of the message that is sent, but the text sent is still the old one, as if I had not modified it at all.

    Is that you that insert new records in the table or other users?
    If other users check if they have re-logged on database because you can see the new text.
    If this is you.... really I dont know.
    Regards,
    Federico

    MBS Specialist since NAV 2.0
    My experiences on Linkedin
  • kinekine Member Posts: 12,562
    I am sure that the problem is the object cache (users logged and using the object before your change, will use old copy from cache...).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dulamandulaman Member Posts: 73
    Thanks guys for your answers!!

    @ebsoft: When I insert manually a new record in the table, everything goes well. If it is other user (in fact, that table is hit via BizTalk) then I don´t get the e-mail.

    @kine: I think I have already synchronized the users but cannot say it for sure. Tomorrow I will try again and will share the results... Is it possible that there is a SQL user (not NAV user) that needs to be synchronized? Does BizTalk needs to be restarted or? (just a guess...)

    EDIT: I have synchronized all the users, then one by one. Nothing works. It is still sending messages based on a code that doesn't exist. ](*,)
    -- dulaman
    "I don't want to believe. I want to know." (Carl Sagan)
  • dayakardayakar Member Posts: 68
    Try with restarting BizTalk.
  • dulamandulaman Member Posts: 73
    Just wanted to let you know that I finally found the source of the issue... I had to restart all the services, one by one, and wait for results for each one... and it was a NAS service that had a $%##^% different name (so it was complicated to locate it on the services list) related to the website's CMS!

    So, what is the moral of the story? Ask the first developer... and also ask the server administrator for all the rights for you!! 8)
    -- dulaman
    "I don't want to believe. I want to know." (Carl Sagan)
Sign In or Register to comment.