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.
0
Answers
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;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/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;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n