Skip to content

Instantly share code, notes, and snippets.

@cameroncf
Created July 28, 2014 14:00
Show Gist options
  • Save cameroncf/d774b8065559ddd8b861 to your computer and use it in GitHub Desktop.
Save cameroncf/d774b8065559ddd8b861 to your computer and use it in GitHub Desktop.
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
}
}
@sebgmc
Copy link

sebgmc commented Oct 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment