Update the new field value for old records
Comments
-
manjulcha007 wrote:Hi all,
Im using navision 6.0 sp1, i have added a new field in the table production order (5405) now i want to update the new field value for old records. i have tried from many ways but im not getting the value.
Regards
Manjul
:? I'm not sure I got what you want to do. You want to fill this new field also for records created before the creation of this field?~Rik~
It works as expected... More or Less...0 -
yes, I want to update new field value for previous records. before created this new field. this new field value is coming ok for new orders but i want to update it for previous records.0
-
manjulcha007 wrote:yes, I want to update new field value for previous records. before created this new field. this new field value is coming ok for new orders but i want to update it for previous records.
ok perfect. What did you try so far, and what error you got?~Rik~
It works as expected... More or Less...0 -
What is the field type and value?
You can run a batch job/report to fill the previous records..0 -
My new field type is decimal, i have tried by creating a process only report.
Regards
Manjul0 -
Troubles In Paradise wrote:manjulcha007 wrote:yes, I want to update new field value for previous records. before created this new field. this new field value is coming ok for new orders but i want to update it for previous records.
ok perfect. What did you try so far, and what error you got?
:thumbsup:
Can you show what did you try?0 -
manjulcha007 wrote:My new field type is decimal, i have tried by creating a process only report.
Regards
Manjul
Could be the right way to follow. Show us what stopped you...~Rik~
It works as expected... More or Less...0 -
Actually i have created a new field which is Current batch size which is decimal.
"Current Batch size" := ("Production Order".Quantity/"No. of Units")*"Production Order"."Batch Size";
here "No. of Units" field is coming from different table Production bom header.
Its working for new orders,
My code in process only report
ProductionBOMHeader.RESET;
ProductionBOMHeader.SETRANGE("No.","Prod. BOM No.");
IF "Production Order".FINDFIRST THEN BEGIN
REPEAT
"Current Batch size" := (Quantity/"No. of Units")*"Production Order"."Batch Size";
MODIFY;
UNTIL ProductionBOMHeader.NEXT =0;
End;
here ProductionBOMHeader table is a record, production bom header table.
Regards
Manjul0 -
manjulcha007 wrote:ProductionBOMHeader.RESET;
ProductionBOMHeader.SETRANGE("No.","Prod. BOM No.");
IF "Production Order".FINDFIRST THEN BEGIN
REPEAT
"Current Batch size" := (Quantity/"No. of Units")*"Production Order"."Batch Size";
MODIFY;
UNTIL ProductionBOMHeader.NEXT =0;
End;
here ProductionBOMHeader table is a record, production bom header table.
Have you taken any dataitem (if yes, in which trigger you have written) or you wrote it in report triggers?
You have put filter on ProductionBOMHeader and wrote "Production Order".FINDFIRST
it should be ProductionBOMHeader.FINDSET and ProductionBOMHeader.MODIFY;0 -
can u please explain me where im wrong step by step. im not clear.
Regards
manjul0 -
manjulcha007 wrote:can u please explain me where im wrong step by step. im not clear.
Are you a technical consultant?
Contact your senior technical person in your organization for step by step explanation..0 -
Sir i think you are frusted with my comment im a beginner in technical environment here is no senior thats why im asking sir................. Sory if u feel hurt.0
-
mohana_cse06 wrote:Have you taken any dataitem (if yes, in which trigger you have written) or you wrote it in report triggers?
I hope you have taken Production Order as dataitem in report :-k
and also I hope you are trying in test database only
0 -
I could only guess what you want to do... I suggest to use this code:
IF ProductionBOMHeader.GET("Prod. BOM No.") THEN BEGIN "Current Batch size" := (Quantity/"No. of Units")*ProductionBOMHeader."Batch Size"; MODIFY; END;Sincerely yours, GRIZZLY
Follow my blog at http://x-dynamics.blogspot.com0
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
