Created
September 24, 2012 04:53
-
-
Save rmehta/3774236 to your computer and use it in GitHub Desktop.
Sample Custom Script for Validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function is called by erpnext | |
// in the browser before saving | |
cur_frm.cscript.custom_validate = function(doc) { | |
if(user=="user1@example.com" && doc.purpose!="Material Receipt") { | |
msgprint("You are only allowed Material Receipt"); | |
validated = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment