Options

Page triggers OnValidate are not fired from web service?

mbjmbj Member Posts: 63
edited 2011-05-12 in NAV Three Tier
Hi all

I have upgraded to Nav 2009 SP1 and my OnValidate triggers are not fired anymore?

Only the triggers on the tables are still fired - but i have to use the page triggers to simulate the CurrFieldNo.

It worked in Nav 2009 SP0.

Comments

  • Options
    kinekine Member Posts: 12,562
    Because there is nothing like "Active field" when calling webservice, you cannot do that. Do not forget that the validation is called when you are updating whole record, there is no "active field" in this process, onvalidate is not called field by field when they are changed, but in batch when the Update is called and they are called in order of the fields on the page.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    mbjmbj Member Posts: 63
    Yes i know the validate triggers on tables are fired i order of the fields on the page(good). But the onvalidate triggers on pages are now disabled in SP1 when calling from web service.

    Then I have to change code, when upgrading from SP0 to SP1.
  • Options
    BeliasBelias Member Posts: 2,998
    kine wrote:
    in order of the fields on the page.
    Really? i thought they were called in the order of how they're evaluated in the C# code! (it was just a mere assuption, as i've never had time to test it deeply :oops: : i'll start these days)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    kinekine Member Posts: 12,562
    No, they could not be evaluated in this order, because the validation is on NAV side and the whole process is triggered with the one call to the Update method, which just pass some XML and there is no "order of assigning the fields"... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    BeliasBelias Member Posts: 2,998
    kine wrote:
    which just pass some XML and there is no "order of assigning the fields"... ;-)
    ...and because we're talking about a page webservice, I guess that the field order in the page determine what is the order of the fields to validate, isn't it? Great! we don't even need to tell the web guys how to order the fields evaluation! :thumbsup:
    I hope to "de-noob" myself about webservices soon :mrgreen::mrgreen:
    Thanks for now!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    kinekine Member Posts: 12,562
    You got it... you know, page is only "camouflaged" xmlport with some additional features...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.