Hello guys,
I have the following custom doctypes and fields:
Doctype : ,Contracte"
Fields: ,adresa_email_presedinte" and ,adresa_email_administrator"
Doctype: ,Sesizari"
Fields: ,adresa_email_1" and ,adresa_email_2"
Can you please help me to get in doctype ,Sesizari" the values from ,adresa_email_presedinte" to ,adresa_email_1" and ,adresa_email_administrator" to ,adresa_email_2".
Doctype ,Sesizari" is linked to doctype ,Contracte", what I am trying to do is to send an email/notification to those 2 email addresses when a new doc Sesizari is created.
Thanks!
Can you translate the doctypeās names to help you better?
Hi @yefritavarez
Doctype : ,Contracte"-contracts
Doctype: ,Sesizari" - issues
Custom field email_address_president
Custom field email_address_administrator
All are custom field and custom doctypes
Hi,
Still not working, value is not getting.
Can you please help
Thanks!
Step 1: Create a link filed in Sesizari doc [type: link, Options: Contracts, name: contract]
Step 2:
Also create two email type field email_address_presiden & email_address_administrator (Mark readonly).
On options filed set contract.email_address_presiden & contract.email_address_administrator
Step 3:
Go to Setup > Email Alert > Create an email alert set Email By Document Field email_address_presiden and email_address_administrator
How do I create an Email Field?
If in Options I add also contract.email_address_president the email is showed but in the alert I can not see the field, just seeing owner, nothing else.
@Florea_Andrei Put Email as options and type as code, then via custom script put the field value:
frappe.ui.form.on(āSesizariā, ācontractā, function(frm, cdt, cdn){
frappe.call({
āmethodā: āfrappe.client.getā,
args: {
doctype: āContractsā,
name: frm.doc.contract
},
callback: function (data) {
frappe.model.set_value(cdt, cdn, āemail_address_presidenā, data.message.email_address_presiden);
frappe.model.set_value(cdt, cdn, āemail_address_administratorā, data.email_address_administrator);
}
})
});
Hi,
Thanks for your help!
I have managed to have this resolved.
Could you kindly share the snippet that helped you solve this issue?
Thanks
1 Like