In the customization guide under POS Template Variables, There are user variables listed as Session.Variable1 to Session.Variable10. How does one set these? How long is a Session? That is, Does one need to reset them if we want them to apply to each transaction?
I appreciate that you posted an example of how to use Session.Variable. However, the example demoed only how to store primitive values such as integer to the variable collection. Do you know if it is possible to store objects of a custom class to the Variable? I guess that the Variable keeps the references to objects only, so I tried to declare Shared member (in VB) (or static in C#) in a class to make it persistent, however, I found that Session.Variable failed to keep the objects persistent among addin components. I wonder how one could transfer objects from one addin to another. Please advise.
No ... this is not possible .. because when you set a NON-PRIMITIVE value into session object.. the system copy only a reference value.. and the reference value contain the virtual-address of your object in the current instance of object.. and when the system remove your add-on from memory.. remove data from memory.. and in new instance the object is un-initialized. If you need to store a custom-class you can try to by-pass the problem through external object (example.. dcom... persistence object with xml ...)
BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.