getting session id from a client action in react web

Hi, I wanna share data between the application pages, so better than passing huge a list between pages, I'm saving the session Id in a client variable and this List data is saved in database for anon users, so I thought the best thing to do uniquely identify it is using session Id plus current date to be even more accurate, the thing is, i'm trying to get the Session Id to save it in database and using the HTTPHandler server action get SessionId, but it returns "" null text each time, is that because no http request is made from a client action, and if so how to overcome it.

Any help?!

Hi, If you are using GetSessionId just to get a unique value to identify your record, Instead of GetSessionId you can also use the GenerateGuid() server action of the System module. It can serve a similar purpose that you are trying.

Check this post

Thanks,

Sachin

Sachin Mahawar wrote:

Hi, If you are using GetSessionId just to get a unique value to identify your record, Instead of GetSessionId you can also use the GenerateGuid() server action of the System module. It can serve a similar purpose that you are trying.

Check this post

Thanks,

Sachin

 

 Hi I know about GUID, thanks for your reply, but I need the session ID so when it actually expires it will have the same behavior

Hi Abeer,

Since you are using Client Variables, I assume you are working on a Reactive App. Unfortunately (or fortunately?), Reactive Apps do not use sessions. So there is no session Id you can use. You'll have to think of another mechanism.

Kilian Hekhuis wrote:

Hi Abeer,

Since you are using Client Variables, I assume you are working on a Reactive App. Unfortunately (or fortunately?), Reactive Apps do not use sessions. So there is no session Id you can use. You'll have to think of another mechanism.

 

 Ah I got it, thanks for your reply, but how  service center is saving session id for even reactive web?

Kilian Hekhuis wrote:

Hi Abeer,

Since you are using Client Variables, I assume you are working on a Reactive App. Unfortunately (or fortunately?), Reactive Apps do not use sessions. So there is no session Id you can use. You'll have to think of another mechanism.

 I'm not questioning your reply at all by my question I just want to understand, would appreciate if you can explain it to me if you know. Thanks.

 

I'm not sure I understand what you mean, where do you see Session Ids in Service Center?