Code Execution Difference between Classic Client and RTC

ssinglassingla Member Posts: 2,973
edited 2010-02-09 in NAV Three Tier
I am facing a problem which I am unable to solve. I will narrate the scenario......

Page 1 (based on Table 1) runs Page 2 (table 2). A function is written in the Page 2 to call a codeunit function with variable of Table 2. The values of Table 1 and 2 are modified in the codeunit.

Problem: Table 1 is getting updated based on values in Table 2 but Table 2 does not.

The code works perfectly in Classic client with SQL server Windows authentication but in RTC it seems to fail. There are no fancy dialog or other features in the code which might create problem in RTC. I had put some messages after the modify command to return the values which shows the updated values but after posting old values are retained.

Is there some document I can refer or I have to put the whole code here for the experts to analyse.
CA Sandeep Singla
http://ssdynamics.co.in

Answers

  • kinekine Member Posts: 12,562
    Try to look at client monitor or SQL Profiler to look "under the hood". Check that all is as you want. Do not forget about the Delayed inserts feature.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ssinglassingla Member Posts: 2,973
    kine wrote:
    Try to look at client monitor or SQL Profiler to look "under the hood". Check that all is as you want. Do not forget about the Delayed inserts feature.

    We are using RTC so Client monitor would not be of any help. I extracted NAV code in c# and ran the debugger in visual studio. The values are getting modified and remains as it is till the last line of code is executed but mysteriously getting replaced after posting.

    To make it worse if we try to post the same record again it updates the values.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • ara3nara3n Member Posts: 9,257
    Sounds to me like it's a refresh issue?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ssinglassingla Member Posts: 2,973
    ara3n wrote:
    Sounds to me like it's a refresh issue?
    Refresh issue would have been solved if I close the form/page and reopen or close the db and reopen. It is something else. We are working on the same and would see how quickly we can address the issue.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • kinekine Member Posts: 12,562
    Still, I recommend to use SQL Profiler to see if the record is really updated and than reverted, or there is another error preventing the update. Sometime it could be problem of permissions like permission to SHOWPLAN .
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ssinglassingla Member Posts: 2,973
    kine wrote:
    Still, I recommend to use SQL Profiler to see if the record is really updated and than reverted, or there is another error preventing the update. Sometime it could be problem of permissions like permission to SHOWPLAN .

    Thanks to all for their valuable inputs. The problem has been rectified. The cause of problem is as follow:

    Form 1 was calling 2 by way of following code:
    table2.reset;
    Filtergroup:=2;
    .
    .
    .
    table2.setrange(Field5,table2.Field5::Option1);
    Filtergroup:=0;
    
    In the process Field 5 was getting updated/modified and as soon as we commented the setrange of the field, the functionality started working. It was working fine with uncommented code in classic client but somehow giving problem in RTC.
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.