Hi, Tabrez, here I have created assembly orders, and I have extended warning field in assembly line so when I add item the field is yes, then the field avail warning which I extended in assembly header should be ticked,
This is my code what wrong in this,
codeunit 50103 ExtAssembly
{
procedure MyProcedure()
var
AssemblyLines: Record "Assembly Line";
AssemblyHeader: Record "Assembly Header";
availableWarning: Boolean;
Enum_DocumentType: Enum "Assembly Document Type";
begin
AssemblyHeader.SetRange("No.", AssemblyLines."Document No.");
AssemblyHeader.SetRange("Document Type", Enum_DocumentType::Order);
// availableWarning := AssemblyLines.FindFirst();
if AssemblyHeader.FindSet() then
repeat
AssemblyLines.SetRange("Avail. Warning", true);
if AssemblyLines."Avail. Warning" = true then begin
AssemblyHeader."Avail. Warning" := true;
AssemblyHeader.Modify();
end;
until AssemblyLines.Next() = 0;
end;
}
Can you please updates in this , as I am not getting my (assembly header) checkbox checked if the field is yes in assembly line. So,