I didn't understand this part and missed it.
Now I understand a little, but does it all only work inside classes?
[SOLVED
I made progress and found another solution using xSysLastValue.
I present a solution for other interested people:
DialogRunbase dlg;
DialogField txtDim, lstWorker;
container conValues;
dlg = new Dialog("Title");
txtDim = dlg.addField(extendedTypeStr(Comments_JP), "Parameters");
lstWorker = dlg.addField(extendedTypeStr(HcmWorkerRecId), "Select worker");
conValues = xSysLastValue::getValue(curExt(), curUserId(), UtilElementType::Job, "SaveLastValue");
if (conValues != conNull()) {
txtDim.value(conPeek(conValues, 1));
lstWorker.value(conPeek(conValues, 2));
}
if (dlg.run()) {
conValues = conNull();
conValues = txtDim.value();
conValues = lstWorker.value();
xSysLastValue::putValue(conValues, curExt(), curUserId(), UtilElementType::Job, "SaveLastValue");
}
It works ok