novaplus
19th September 2019, 13:42
Hello,

Is there any way to get values from modeless session: start.session(MODELESS,"tc...",,)
on save/close command?

Example:
Open session tcibd0501m000
On create new item we open custom session (tcibd0101s004) using code:

choice.add.set:
before.choice:
start.session(MODELESS,"tcibd0101s004","", "")
choice.again()

We use choice.again() function to prevent opening of standard session (tcibd0101s000)

We expect to get our new Item ("tcibd001.item") on save or on save and close command from session tcibd0101s004.

novaplus
19th September 2019, 18:14
Solution:

1. Create new extern variable in primary session (tcibd0501m000):
extern domain tcitem itmno

2. Use function put.var to put variable from second session to parent one:
put.var( parent, "itmno", tcibd001.item )