Save () on data source does not fire querySave / postSave events

My save button is using SSJS with some logic. I want to keep the data source, so I use;

The script works, but the querySave / postSave code is not executed.

The only workaround is to use a simple action and divide the button event into blocks for "execute script", "Save document (simple action)" and "execute script" (just return the string "Navigation").

Is it possible to save datasource in SSJS and fire qS / pS events?


source to share

2 answers

try this SSJS code:

var dsName = "document1.DATASOURCE";
var app = facesContext.getApplication();
var ds = app.getVariableResolver().resolveVariable(facesContext, dsName); facesContext, true );


The dsName variable contains the name of your data source, followed by ".DATASOURCE". To use it fe with the current document, you should go to "currentDocument.DATASOURCE".

Hope it helps




Sven what is the difference between your code and () is it something other than querysave and postsave?



All Articles