Hi,
I have to set a value in Browse screen (AbstractLookup) when (after) some modifications are made in Editor screen (after the Editor Screen is closed).
This is the code:
@Override
public void init (or ready..doesn't matter){
label.setValue("Last Invoice: " + lastNumberService.getCurrentNumber());
}
Unfortunately the value is changed only after I close/(re)open the application.
What is the right method (approach) to use?
(The project was made in Cuba 6 imported in Cuba 7).
I’ve tried this but doesn’t work:
if (transactionsDs.getItems().size()>0) {
Transaction transaction = transactionsDs.getItem();
AbstractEditor editor = openEditor("crm$Transaction.edit", transaction, WindowManager.OpenType.NEW_WINDOW);
editor.addCloseListener((String actionId) -> {
label.setValue("Last Invoice: #" + lastNumberService.getCurrentNumber());
// do something
});
}