Modifying Records on BOM Components Table
bekio
Member Posts: 204
Hello everyone,
If i want to modify some fields in Bom Components table, if i modify just one component i want to update all the components for that Parent Item No.(additional field added (Marked for Export)), so i have added some code declaring Global Variable the Bom Componets table as Record and than i have made some filters to that record variable, and fill this additional field Marked for Export with some value. But when i try to move to another record it displays me a message like in attachment.
Any good suggestions, would help me very much.
Thanks to everyone.
If i want to modify some fields in Bom Components table, if i modify just one component i want to update all the components for that Parent Item No.(additional field added (Marked for Export)), so i have added some code declaring Global Variable the Bom Componets table as Record and than i have made some filters to that record variable, and fill this additional field Marked for Export with some value. But when i try to move to another record it displays me a message like in attachment.
Any good suggestions, would help me very much.
Thanks to everyone.
0
Answers
-
Is the line no. the current line no. you are modifying?
Can you post the code you have to modify all the other records?
Did you exclude the current record from your code?
otherrecords.setrange("bom No.","bom No.");
otherrecords.setfilter("Line No.",'<>%1',"line No.");
otherrecords.modifyall('marked to export",true);
"marked to export." := true;0 -
Thanks ara3n,
Yes i want to modify allso the current line no. I want to modify even the record that i am focused on it. I have created a Codeunit to do this. Any suggestion.
The code that i am using is:
BOMComp.RESET;
BOMComp.INIT;
BOMComp.SETRANGE(BOMComp."Parent Item No.","Parent Item No.");
IF BOMComp.FINDFIRST THEN
REPEAT
BOMComp."Marked to export":=TRUE;
BOMComp.MODIFY;
UNTIL BOMComp.NEXT=0;0 -
BOMComp.RESET; BOMComp.INIT; BOMComp.SETRANGE(BOMComp."Parent Item No.","Parent Item No."); BOMComp.setfilter("Line No.",'<>%1',"line No."); IF BOMComp.FINDFIRST THEN REPEAT BOMComp."Marked to export":=TRUE; BOMComp.MODIFY; UNTIL BOMComp.NEXT=0; "Marked to export":=TRUE;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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 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
