Here is a handy way to code complex methods, calculations, etc. for use in solution model.
Simply substitute line feeds with \n
For example:
//create method for button
var jGoToDetailMethodCode =
"function NAV_goToPanDetail(event) { \n\
var vCurrentForm = event.getFormName() \n\
globals.nav_NAV_gotoEntity(vCurrentForm, 'rel_organisation_pan_detail'); \n\
}";
var jGoToDetailMethod = jForm.newFormMethod(jGoToDetailMethodCode);
Extra tip:
If you require a ‘\n’ string in your code, substitute it with ‘\n’.