Options

Where does validation on posting groups occur

dlerouxdleroux Member Posts: 87
I have a client that wants to require his customer records to have a payment terms code defined in the same way that Navision requires a customer record to have posting groups defined before you can fill out an order card.

I have tried using the debugger to follow the code on the order card from the point where it throws errors for missing posting groups, but when the error is thrown it pretty well makes hash of the debugger as well.

I'm assuming all I really need is to find the right spot to insert a TESTFIELD call- can anyone give me a gentle application of ye olde clewbat?

Thanks

Comments

  • Options
    KowaKowa Member Posts: 918
    Look for this code in Table 36 in Fields
    Bill-to Customer No. - OnValidate()
    AND
    Sell-to Customer No. - OnValidate()
    GetCust("Bill-to Customer No.");
    Cust.CheckBlockedCustOnDocs(Cust,"Document Type",FALSE,FALSE);
    Cust.TESTFIELD("Customer Posting Group");

    and add

    Cust.TESTFIELD("Payment Terms Code");
    Kai Kowalewski
  • Options
    HalMdyHalMdy Member Posts: 429
    In table 36-Sales Header
    On trigger "Bill-to Customer No."-OnValidate :


    GetCust("Bill-to Customer No.");
    Cust.TESTFIELD(Blocked,FALSE);
    Cust.TESTFIELD("Customer Posting Group");
    Cust.TESTFIELD("Gen. Bus. Posting Group");


    Here is the place where you can add your test :
    Cust.TESTFIELD("Payment Terms Code");

    Hope can help ...
  • Options
    HalMdyHalMdy Member Posts: 429
    =D> Kowa !!!

    You put answers quicker than me !
  • Options
    dlerouxdleroux Member Posts: 87
    To both of you. Eventually I will relearn or remember all these little goodies. I think I got spoiled by spending a few years away from Navision.
Sign In or Register to comment.