Client Script get item_code from new line

What is wrong here? Any idea why row.item_code is undefined.
I’m to get the item_code when I add a new line to grab other information in the db from the item_code.

frappe.ui.form.on('Purchase Order Item', {
   
    item_code(frm, cdt, cdn) {
        console.log("Item code");
        var row = frappe.get_doc(cdt, cdn);
        console.log(row); // Good!
        console.log(row.item_code); // Return undefined, why?
        }
})

Hi @Samuel_Gervais ,
Try this way. It may help you.

frappe.ui.form.on('Purchase Order Item', {
    item_code(frm, cdt, cdn) {
        console.log("Item code");
        var row = locals[cdt][cdn];
        console.log(row); 
        console.log(row.item_code);
        }
})

Thank you!