Fetching values from custom field

Hi

I am new to the custom scripting in erpnext.
We are adding a columns in the BOM explosion item and trying to fetch the values for the columns newly added . The data are already available in the BOM. I tried with the Option and the Fetch Item link in the custom form , but unable to get the columns updated.
I feel that there needs a custom scriptiing for fetching the data
If any one can help in providing the typical custom script for fetching the data

Please follow the link

Hi

Main aim for the the custom script is

Requirement: The Item code has following details associated

  1. Drawing_No
  2. Basic Material
  3. StandardDescription

Now when we have the BOM Exploded Item in the BOM where we have created the custom field as drawing , material and Standard respectively in the Form of BOM Explosion Item. In addition the exploded items in the main form of BOM there is an child table with the name of exploded_items where we need to fetch the values from the Item document for each of the item coded in the exploded item .

Following was the code that i tried and not working

frappe.ui.form.on('BOM ', {
exploded_items:function(frm) {
frappe.ui.form.on("BOM Explosion Item ", “item_code”, function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
alert(“Code is Executing”);
$.each(d.item_code, function(index, row){
v_drawing=frappe.get_value(“Item”,item_code,‘drawing_no’);
v_standard=frappe.get_value(“Item”,“item_code”,“standard_description”);
v_basic_material =frappe.get_value(“Item”,“item_code”,“basic_material”);
d.drawing=v_drawing;
d.material=v_basic_material;
d.standard=v_standard
});

    });
cur_frm.refresh();
frappe.msgprint("Code Execution Completed");	// your code here
}

});

I am new to this custom scripting and require the help to resolve this issue.

Request you to kindly help me in resolving this issue

Awaiting for your reply