Options

Mimic onValidate Trigger in ASP.NET and Webservice

philipuskdphilipuskd Member Posts: 36
edited 2011-10-28 in NAV Three Tier
I'm trying to create a Sales Order page using ASP.NET to enhance the NAV so that the user can access them using their web browsers.

The problem is that when Inserting or updating record, when I change the value of a field, I cannot have the other fields filled or modified as if in the NAV Client (Classic and RTC).

I actually can use onChange event and postback the page to do this, but each time the page loads, the records will be re-read, which mean every postback, the users need to wait a bit long because the webservice will re-read all of the records.

Example:
I have an ASP.NET page of Sales Order with its Lines. User can do First, Prev, Next and Last SO for all available SO. when I change the No. field of the line, the No., Description, and other informations should be reset to the default value of the No. specified as in RTC or Classic Client. to do this I need to trigger the onChange event and the page will be post back. When the page reloads, I handle the onChange by updating the records. But to rebind the SO correctly, I must to reload the all SO data and its line.

I think this is not good for web application. it will loading and reloading data all the time. is there any strategy to work around or minimize the data load?

Comments

  • Options
    kinekine Member Posts: 12,562
    You cannot fully mimic the NAV behavior. The webservices are not for that. You can only read the record, set different values and modify the record. During modify NAV will call OnValidate of each changed field in order, in which the fields are in the page in NAV.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.