Skip to content

Instantly share code, notes, and snippets.

Created Feb 17, 2015
What would you like to do?
Frappe Version 5 Client Side API
// button click "Get Items"
frappe.ui.form.on("Stock Reconciliation", "get_items", function(frm) {
// prompt user for warehouse
frappe.prompt({label:"Warehouse", fieldtype:"Link", options:"Warehouse", reqd: 1},
function(data) {
// get latest balance and valuation rate{
args: {warehouse: data.warehouse},
callback: function(r) {
// set the values in the item table
var items = [];
for(var i=0; i< r.message.length; i++) {
var d = frm.add_child("items");
$.extend(d, r.message[i]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment