Skip to content

Instantly share code, notes, and snippets.

View RobertSchouten's full-sized avatar

robert schouten RobertSchouten

  • IAG
  • Perth Australia
View GitHub Profile
@RobertSchouten
RobertSchouten / gist:673cf231e24912b418f8e9079dd0481e
Created April 6, 2016 06:43
on save create child and then pass back to doctype
if (frm.doc.__islocal != 1) {
var route = frappe.get_prev_route()
if (route[1] == "User") {
var found = false
var userdoc = frappe.get_doc("User",route[2]);
for (i = 0;i<userdoc.user_emails.length;i++){
if (userdoc.user_emails[i].email_account==cur_frm.doc.name){
found = true