converting 2009NAV object to NAV2016
mdsr
Member Posts: 163
Hi experts,
I want to design a table based on 2009 nav TABLE object.can any one know how to do that code as follows
I want to design a table based on 2009 nav TABLE object.can any one know how to do that code as follows
OBJECT Table 50005 Purchase QC Header
{
OBJECT-PROPERTIES
{
Date=17-02-16;
Time=11:51:55;
Modified=Yes;
Version List=
}
PROPERTIES
{
OnInsert=BEGIN
IF "QC Test Certificate No." = '' THEN BEGIN
InventorySetup.GET;
InventorySetup.TESTFIELD(InventorySetup."QC Test Certificate No.");
//NoSeriesMgt.GetNextNo(InventorySetup."QC Test Certificate No.",TODAY,TRUE);
NoSeriesMgt.InitSeries(InventorySetup."QC Test Certificate No.",xRec."No. Series",0D,"QC Test Certificate No.","No. Series");
END;
END;
LookupFormID=Form50012;
}
FIELDS
{
{ 1 ; ;GRN No. ;Code20 ;TableRelation="Purch. Rcpt. Line";
OnValidate=BEGIN
TESTFIELD("QC Tested Lines",0);
PurchRecptHeader.GET("GRN No.");
varGRNNo:=PurchRecptHeader."No.";
"Vendor No." := PurchRecptHeader."Buy-from Vendor No.";
"Vendor Name" := PurchRecptHeader."Buy-from Vendor Name";
"Location Code" := PurchRecptHeader."Location Code";
"Posting Date" := PurchRecptHeader."Posting Date";
"Vendor Shipment No":=PurchRecptHeader."Vendor Shipment No.";
"QC Creation Date" := WORKDATE;
PurchRecptLine.RESET;
//PurchRecptLine.SETRANGE(PurchRecptLine."Document No.","GRN No.");
PurchRecptLine.SETRANGE(PurchRecptLine."Document No.",varGRNNo);
PurchRecptLine.SETRANGE(PurchRecptLine.Type,PurchRecptLine.Type::Item);
PurchRecptLine.SETFILTER(PurchRecptLine.Quantity,'>0',0);
PurchRecptLine.SETRANGE(PurchRecptLine."QC Needed",TRUE);
PurchRecptLine.SETRANGE(PurchRecptLine."QC Tested",FALSE);
IF PurchRecptLine.FINDSET THEN
BEGIN
REPEAT
PurchaseQCLine.INIT;
PurchaseQCLine."QC Test Certificate No." := "QC Test Certificate No.";
PurchaseQCLine."GRN No." := "GRN No.";
PurchaseQCLine."Line No." := PurchRecptLine."Line No.";
PurchaseQCLine."Item No." := PurchRecptLine."No.";
PurchaseQCLine.Description := PurchRecptLine.Description;
PurchaseQCLine.Quantity := PurchRecptLine.Quantity;
PurchaseQCLine."QC Accepted Qty":=PurchRecptLine.Quantity;
PurchaseQCLine."Location Code" := PurchRecptLine."Location Code";
PurchaseQCLine.INSERT;
UNTIL PurchRecptLine.NEXT = 0;
END
ELSE
ERROR('There are no QC result to be tested');
END;
}
0
Answers
-
{ 2 ; ;Vendor No. ;Code20 ;TableRelation="Purch. Rcpt. Line"."Buy-from Vendor No." WHERE (Document No.=FIELD(GRN No.)); Editable=No } { 3 ; ;Posting Date ;Date ;Editable=No } { 4 ; ;QC Creation Date ;Date } { 5 ; ;Vendor Name ;Text50 ;Editable=No } { 6 ; ;No. of Lines ;Integer ;FieldClass=FlowField; CalcFormula=Count("Purch. Rcpt. Line" WHERE (QC Needed=FILTER(Yes), Document No.=FIELD(GRN No.), Quantity=FILTER(>0))); Editable=No } { 7 ; ;QC Tested Lines ;Integer ;FieldClass=FlowField; CalcFormula=Count("Purch. Rcpt. Line" WHERE (QC Tested=FILTER(Yes), Document No.=FIELD(GRN No.))); Editable=No } { 8 ; ;QC Test Certificate No.;Code20 ;OnValidate=BEGIN IF "QC Test Certificate No." <> xRec."QC Test Certificate No." THEN BEGIN InventorySetup.GET; NoSeriesMgt.TestManual(InventorySetup."QC Test Certificate No."); "No. Series" := ''; END; END; } { 9 ; ;Location Code ;Code10 ;TableRelation=Location; Editable=Yes } { 10 ; ;No. Series ;Code20 } { 11 ; ;Status ;Option ;OptionCaptionML=ENU=Open,Finished; OptionString=Open,Finished; Editable=No } { 12 ; ;Vendor Shipment No ;Text30 } } KEYS { { ;QC Test Certificate No. ;Clustered=Yes } { ;Vendor No.,GRN No.,Posting Date } } FIELDGROUPS { } CODE { VAR PurchRecptLine@1000000000 : Record 121; PurchRecptHeader@1000000001 : Record 120; InventorySetup@1000000002 : Record 313; NoSeriesMgt@1000000003 : Codeunit 396; PurchaseQCHeader@1000000004 : Record 50005; PurchaseQCLine@1000000005 : Record 50006; varGRNNo@1000000006 : Code[20]; PROCEDURE AssistEdit@1000000000() : Boolean; BEGIN InventorySetup.GET; InventorySetup.TESTFIELD(InventorySetup."QC Test Certificate No."); IF NoSeriesMgt.SelectSeries(InventorySetup."QC Test Certificate No.",xRec."No. Series","No. Series") THEN BEGIN NoSeriesMgt.SetSeries("QC Test Certificate No."); EXIT(TRUE); END; END; BEGIN END. } }0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions