i want to mark "vendor Cr. Memo No" on Purchase Return Orders as not mandatory.
i searched for the onValidate trigger of the field under Purchase Header table but nothing is written there. so how can we do this
IF Invoice AND PurchSetup."Ext. Doc. No. Mandatory" THEN
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN
TESTFIELD("Vendor Invoice No.")
ELSE
TESTFIELD("Vendor Cr. Memo No.");
IF Invoice AND PurchSetup."Ext. Doc. No. Mandatory" THEN
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN
TESTFIELD("Vendor Invoice No.")
ELSE
TESTFIELD("Vendor Cr. Memo No.");
Answers
there is field availble in Purchase & payables setup - External document No mandatory .
if it is Yes , then at the time of Invoice and credit memo system will ask the vendor Invoice No, vendor credit memo No.
coding :
IF Invoice AND PurchSetup."Ext. Doc. No. Mandatory" THEN
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN
TESTFIELD("Vendor Invoice No.")
ELSE
TESTFIELD("Vendor Cr. Memo No.");
Sometimes the client dont receive any credit memo no from the vendor so they dont want this field to be mandatory.
thanx for the immediate reply
thanx
this post has your answer, if you don't want it mandatory, then do not check the box on the setup.
forget about code unit 90, bla bla bla, just do the setup as it was designed.