I’m going to try to compile a list of useful functions here. If anyone has any, please reply and I will add them to this top post. Hopefully this will make it easier for people to find the function they need.
Fetching Data
//Fetches a field from one document to another.
//Link-field in your target document, that points to your source document.
//Source - Field you are pulling from
//Target - Field you are putting the pulled information.
cur_frm.add_fetch('link','source','target');
Time
//Gets today's date
frappe.datetime.get_today()
//Calculates the difference between two dates
frappe.datetime.get_day_diff("2016-05-05", "2016-05-03" )
//Adds the specified number of days
frappe.datetime.add_days("2016-05-03", 2)
Haven’t used them, so I can’t verify whether they need updates (post was last updated in 2014). Server side calls look to be incorrect. Client side looks to be OK.
You can still use it in the JS Console to get information for debugging purposes (eg cur_frm.doc.[field_name]) but if you’re writing JS code, you should refrain from that.