Get information from fee_structure with $.ajax or frape.call

Hello.

I need to add one new child in the table below in the picture and I’m having a lot of problems.
I would like to do this in my custom script.
How can I do this?
I have the name of the fee_Structure as Student Program and I need to create the row in the table.
I saw some samples but nothing concret.

I saw this one telling me how to add a child, but I don’t know the method that I need to pass :

Looking at this document, I saw some informations about the fee_structure:
frappe.github.io/erpnext/current/models/schools/fee_structure

Could you please help me with this giving me some example?
Thank you!

What have you tried? Please share your code.

hey @netchampfaris.

I’m trying to get the information for the fee_structure in this first moment.

I’m using this :

frappe.ui.form.on(“Program Enrollment”, “student”, function(frm) {
var kindOfStudent = frm.doc.application_status;
if (kindOfStudent == “New Student”){
frm.set_value(‘academic_year’, “33 Weeks”);
} else {
frm.set_value(‘academic_year’, “33 weeks renewal”);
}
var d = frm.doc;
frappe.call({
method:“erpnext.schools.doctype.fee_structure.fee_structure”,
args: {
doc: frm.doc
},
callback:function(r){
console.log(r);
}
});
});

But the answer is been 404 error, page not found.
I think my problem is the url that i’m passing in the method.