Learning Erpnext Deeply

I have a question
that why 2 attendee is written in this line of code.


“User” is doctype
“attendee” is a link to User in other doctype Meeting Attendeee.
Thank YOU.

where did you get this code?

but to explain:
frappe.get_doc(“Doctype Name”,“name”)
“name” is your entry’s unique ID

ex. you have doctype Person

person = frappe.get_doc(“Person”,“john”)

1 Like

I got this code in this video:

Doctype Linking is like this:

Meeting->Meeting Attendee->User

according to you, we can use

then why is this two attendee

Thank You.

Hi @vivek_ilexSquare
I haven’t gone through the video yet but I still think I can help.

Consider frappe.get_doc(dt, dn) where dt–> Doctype and dn - - > doctype name.

Therefore it means attendee.attendee returns the name attribute of a User. Attendee definitely has an attribute attendee and the value stored in attendee is a record from User.name

1 Like

Yes ,you are right and Thanks Buddy.
For me frappe is too hard. so learning by asking questions.

I gone through video many times. then I realised that,
attendee is given self.attendees(table) value,
it means now user have value of self.attendees.attendee to reach User doctype.
so to access the values of first_name from user doctype we call user.first_name.

Thank you.

I have 2 field in Sales Order doctype : order_type and customer_name

And I am doing Custom Script
I have to put customer_name value into order_type .

for that i used this code:
cur_frm.set_value(“order_type”, “customer_name”);

but it prints like this “customer_name” .

But I have to print value of customer_name, which is stored.

Thank You.