//Replace "DocType" with the source DocType
frappe.ui.form.on("DocType", {
//The trigger can be changed, but refresh must be used to use a button
refresh: function(frm) {
//The following line creates a button.
frm.add_custom_button(__("Update"),
//The function below is triggered when the button is pressed.
function() {
frappe.call({
"method": "frappe.client.set_value",
"args": {
//replace "Target DocType" with the actual target doctype
"doctype": "Target DocType",
//replace target_doctype_link with a link to the document to be changed
"name": frm.doc.target_doctype_link,
"fieldname": {
//You can update as many fields as you want.
"target_field_1": frm.doc.source_field_1,
"target_field_2": frm.doc.source_field_2,
"target_field_3": frm.doc.source_field_3,
"target_field_4": frm.doc.source_field_4,
"target_field_5": frm.doc.source_field_5 //Make sure that you do not put a comma over the last value
},
}
});
});
}
});
Tuesday, 6 March 2018
Push Changes to a document from another document
Subscribe to:
Post Comments (Atom)
Django rest api - filter
views.py from django_filters.rest_framework import DjangoFilterBackend class PollList(viewsets.ModelViewSet): queryset = X.objects...
-
http://asdf.com/api/method/asd.api.api.create_attendance? employee=EMP/asdfghjk&& attendance_date=201&&in_store=test...
-
form.py text = forms.CharField(required=False, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder...
-
1) add code on report_name.js file // Copyright (c) 2016, DP and contributors // For license information, please see license.txt /* esli...
No comments:
Post a Comment