My save button uses SSJS with some logic. I want to save datasource, so I use
document1.save();
Script works, but querySave/postSave code is not
Sven what is the difference between your code and currentDocument.save() is something else happening than querysave and postsave?
please try this SSJS code:
var dsName = "document1.DATASOURCE";
var app = facesContext.getApplication();
var ds = app.getVariableResolver().resolveVariable(facesContext, dsName);
ds.save( facesContext, true );
The variable dsName contains the name of your datasource followed by ".DATASOURCE". To use it f.e. with current document, you have to change to "currentDocument.DATASOURCE".
Hope this helps
Sven