Created
July 28, 2014 14:00
-
-
Save cameroncf/d774b8065559ddd8b861 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public any function onBeforeContentSave($) { | |
var newBean = $.event('newBean'); | |
if( !len(trim(newBean.getCredits())) ) { | |
newBean.setCredits( $.currentUser().getFullName() ); // autoinsert name | |
//newBean.setCredits( $.currentUser().getUserID() ); // autoinsert id | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Combined with this gist (https://gist.github.com/stevewithington/1d9e2939feccbc982285) perfect!