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.
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?
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.
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?
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?
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.
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;
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.
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;
Comments
:? 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?
It works as expected... More or Less...
ok perfect. What did you try so far, and what error you got?
It works as expected... More or Less...
You can run a batch job/report to fill the previous records..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Regards
Manjul
:thumbsup:
Can you show what did you try?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Could be the right way to follow. Show us what stopped you...
It works as expected... More or Less...
"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
Manjul
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;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Regards
manjul
Are you a technical consultant?
Contact your senior technical person in your organization for step by step explanation..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I hope you have taken Production Order as dataitem in report :-k
and also I hope you are trying in test database only
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Follow my blog at http://x-dynamics.blogspot.com