Skip to content

Instantly share code, notes, and snippets.

@harsaharsa
Created November 3, 2016 13:43
Show Gist options
  • Save harsaharsa/202b3cd92c31163a34a0de4b8fbb4a03 to your computer and use it in GitHub Desktop.
Save harsaharsa/202b3cd92c31163a34a0de4b8fbb4a03 to your computer and use it in GitHub Desktop.
Scan barcode and open new window with default values
corodva.plugins.barcodeScanner.scan(function(result) {
if (result.cancelled != null) {
return;
} else {
var prefills = {
scanned_code: result
}
supersonic.module.layers.push("data.ConsultantRequest.new", {
"default-values": JSON.stringify(prefills)
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment