item's bom reporting

Dear all, I need your help to let me know how to generate report type of item in the production BOm. Basically, I need to add a field that explain the item’s output or consumption report method whether it’s manual, forward or backward but it can’t be modified except drilldown. To dissallow modified, I have known it but it’s difficult to design it because it’s an option type in the item card not a table. tks a lot for your all attn. rgds, Mark

Could you please rephrase your question to make it a little bit clearer what you want to achieve ? Maybe with a small example, that always helps [;)]

tks for your reply, I want to create a new field in the production BOM table and the field relates to a field in the item card, the field type is option . The new field type will be option and placed in the production BOm, so if I select item in the production BOM, the new field will be filled automatically like unit of measure in the production BOM. I have created one field but the field type is code not option. What I want is the field actually has been filled in the item card and also I can make the field available in the production BOM. rgds, Mark

You need to create both fields (item card and production bom) using the same field type (both should be option in your case) and use the same optionstring/optioncaption. In the OnValidate trigger of the item number in the production BOM transfer the value of the “Type field” of the item to the production BOM. That should be it and is one of the easier things to do in Navision.

Dear Thomas, Thanks for your prompt answer. Here is the codes in the on Validate: No. - OnValidate() TESTFIELD(Type); TestStatus; CASE Type OF Type::Item: BEGIN Item.GET(“No.”); Description := Item.Description; Item.TESTFIELD(“Base Unit of Measure”); “Unit of Measure Code” := Item.“Base Unit of Measure”; IF “No.” <> xRec.“No.” THEN “Variant Code” := ‘’; END; Type::“Production BOM”: BEGIN ProdBOMHeader.GET(“No.”); ProdBOMHeader.TESTFIELD(“Unit of Measure Code”); Description := ProdBOMHeader.Description; “Unit of Measure Code” := ProdBOMHeader.“Unit of Measure Code”; END; END; What shout I write there ? I didn’t understand yet… Should I write the field name there with this one: “report” := item.“report” ? Rgds, Mark

If “report” is your field name then yes. CASE Type OF Type::Item: BEGIN Item.GET("No."); Description := Item.Description; Item.TESTFIELD("Base Unit of Measure"); "Unit of Measure Code" := Item."Base Unit of Measure"; IF "No." <> xRec."No." THEN "Variant Code" := ''; // This is Mark's reporting - BEGIN report :=; // This is Mark's reporting - END END; Type::"Production BOM": BEGIN Something like that

Dear Thomas, Thanks for your answer, I actually have done what you’ve said, the report field type is option in the item card and also the same for production BOM, but I can’t still using the report field. Do I have write something in the C/AL global editor ? rgds, mark

What does “I can’t still use the field” mean ? Can you paste your code here ?

Hi Thomas, I am very thankful for your suggestion, it works successfully. rgds, Mark Christs

Always a pleasure