Session variables cleaned when Email screen Preparation is reached

Session variables cleaned when Email screen Preparation is reached

  
Hi everyone,

While I was debugging my eSpace, I noticed that session variables are cleaned automatically as soon as the execution reaches an Email screen Preparation.

Why does it happen? Is it because of any built-in email definition that I am possibly missing?

Thanks in advance for any help.


Best regards,
Ricardo Reis
Hi Ricardo,

are the vars cleaned, or simply are not reachable since the email is something on server side, and you are trying to access to user session vars?

if you need to use the session vars inside the email you could pass them as input parameters.

is that your question?

regards,
Miguel 
Hi Miguel,

What I'm trying to do is accessing a user session variable inside the email screen Preparation, but I can't pass it as an input parameter because it's a record list, which is not allowed. The session variable contains the file list to use as attachments to the email.

Just before the Send email element is called, the session variables are OK. When it starts executing the email Preparation, the session vars are automatically cleaned, and I can´t figure out why.

I've already searched the forums here, as well as the support documentation, but it seems nobody has ever had this problem, nor the documentation states a thing about it.

Any ideas?


Best regards,
Ricardo Reis
Hi Ricardo,

that is happening because the Session Vars are stored per user, and emails are something in the server, so this way you cannot access the Session Vars.

So, can't you obtain that record list inside the preparation email, by querying there?


and a side note, you should also not use Record List as Session Vars. 

regards,
Miguel
Hi Miguel,

Ok, it's a server side thing. I'm enlightened. :)

Even though I do know it's not recommended to use record lists as session variables, I need to use them as such, because the app I'm developing sometimes needs to pass lists across screens, and I cannot use DB tables for that because this app is to be used by several users who can be doing the same thing, at the same time, but in different workstations.

But, as far as my question is concerned, I'll have to use a DB table to pass the attachment list. To avoid conflicts among users, the solution is to have the user id as one of the table attributes.

Thanks for all your support.


Best regards,
Ricardo Reis
You're welcome!

I'm glad that i've clarified a bit the things to you!

regards,
Miguel Antunes