Hello all,
I have a simple question for a Sales Order issue:
I need to compare the 'Payment Terms Code' on the Invoicing tab with the 'No.' field value on the subform below.
If Type on the subform is = Resource and No. <> Payment Terms Code, the message box should display, telling the user the values are not equal.
What is the best way to do this? I want to make sure this is done in the correct location.
Thanks for any help it is much appreciated - gad1
0
Answers
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I'm on track there for Sales Line table location for the code - thank you.
However, what is the correct way to compare the two values mentioned, one on the Invoicing tab of the Sales Order (form) and the value of No. (subform).
It's not firing the message box correctly for me (not at all) - I must be missing something in my code syntax. How do you do this? Thanks - gad1
you should be on the "No." -Onvalidate() trigger
If you scroll down near the bottom of this trigger you should see something like this..
Type::Resource:
BEGIN
Res.GET("No.");
Res.TESTFIELD(Blocked,FALSE);
Res.TESTFIELD("Gen. Prod. Posting Group");
Description := Res.Name;
VALIDATE("Unit of Measure Code",Res."Unit of Measure Code");
"Unit Cost ($)" := Res."Unit Cost";
"Gen. Prod. Posting Group" := Res."Gen. Prod. Posting Group";
"Tax Prod. Posting Group" := Res."Tax Prod. Posting Group";
"Tax Group Code" := Res."Tax Group Code";
"Allow Item Charge Assignment" := FALSE;
//Add you code to the end
IF SalesHeader."Payment Terms Code" <> "No." THEN
MESSAGE ('Incorrect Code - doesn't match header!!');
//Don't forget to add a little comment about what the change is for!!!
http://www.BiloBeauty.com
http://www.autismspeaks.org
I made a small error and this resolved it.
Have a great day - gad1
http://www.BiloBeauty.com
http://www.autismspeaks.org