Update fields on a Purchase Order

liizz
Member Posts: 125
Hi all,
I have done a customised form whereby user has the possibility to create a PO which will create entry in the standard purchase order form(50).
Now, there is a boolean field[Created] will flag to TRUE if its created and I have placed the field(Qty. to Receive which comes from the form 50) on the customised form.
Also, each time when a user wants to change the qty. to receive on form 50 before posting, it should update the field Qty. to Receive found on customised form. And also after posting, it should take the new value for that field.
Please find my codes below:
ReqLineL.SETRANGE(Created,TRUE);
ReqLineL.SETRANGE("Last PO No.",PurchaseLine."No.");
ReqLineL.SETRANGE("Line No.",PurchaseLine."Line No.");
IF ReqLineL.FINDSET THEN BEGIN
REPEAT
ReqLineL."Purch. Qty to Receive":=PurchaseLine."Qty. to Receive";
ReqLineL.MODIFY;
UNTIL ReqLineL.NEXT=0;
END;
The codes are not working actually.
Help me plz..
Thanks
Liizz
I have done a customised form whereby user has the possibility to create a PO which will create entry in the standard purchase order form(50).
Now, there is a boolean field[Created] will flag to TRUE if its created and I have placed the field(Qty. to Receive which comes from the form 50) on the customised form.
Also, each time when a user wants to change the qty. to receive on form 50 before posting, it should update the field Qty. to Receive found on customised form. And also after posting, it should take the new value for that field.
Please find my codes below:
ReqLineL.SETRANGE(Created,TRUE);
ReqLineL.SETRANGE("Last PO No.",PurchaseLine."No.");
ReqLineL.SETRANGE("Line No.",PurchaseLine."Line No.");
IF ReqLineL.FINDSET THEN BEGIN
REPEAT
ReqLineL."Purch. Qty to Receive":=PurchaseLine."Qty. to Receive";
ReqLineL.MODIFY;
UNTIL ReqLineL.NEXT=0;
END;
The codes are not working actually.
Help me plz..
Thanks
Liizz
0
Comments
-
i guess source table of your customized form in Requisition Line..
What value is stored in Requisition Line Last PO No. field? is it Document No. or No.?
Should be
ReqLineL.SETRANGE("Last PO No.",PurchaseLine."No.");
or
ReqLineL.SETRANGE("Last PO No.",PurchaseLine."Document No.");
and also make sure that Line No. filter is right..
ReqLineL.SETRANGE("Line No.",PurchaseLine."Line No.");??0 -
Hi all,
Yes Requisition Line record variable for my customised form.
I made a mistake while pasting the codes here. Its Document No. not No. on Purchase Line.
But its not working at all.
The fields on my customised form is not being refreshed after posting a Purchase Order(Form 50).
Plz help...
Liizz0 -
Where did you write your code to update the lines while posting?0
-
Mohana,
I have written the code in a codeunit and I have called it on the Post button of my customised form.
Thanks
Liizz0 -
You want to insert/update the line in your customized form (requision line) each time whenever user insert/modify Qty to receive in form50..
You have written code and calling the same in Customized form..is it?
you have to run the function from customized form each time manually to update the changes..
Is that your whole code? with that code you cant achieve what you want..0 -
Yes this is my code to do this. I want to update lines on customised form each time the field Qty. to Receive is modified on form 50.
But how to I update the lines in the form.
Please advise.0 -
You can call the above code in OnValidate trigger of Qty received in Table 37-Sales Line0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions