Micheal,
You should be able to put that data in local / session storage or store in a cookie. You could use both of these in JS to set and get cookies:
function setCookie(cname, cvalue, exdays) {
const d = new Date();
d.setTime(d.getTime() + exdays);
let expires = "expires=" + d.toGMTString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for (let i = 0; i < ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
Hi Michael!
Not sure if it would work for your particular use-case, but Tecton exposes the setTectonCacheObject and getTectonCacheObject capabilities in order to store and retrieve data from the platform cache.
https://cdn4.onlineaccess1.com/cdn/base/tecton/v1.25/Documentation/capabilities/setTectonCacheObject
https://cdn4.onlineaccess1.com/cdn/base/tecton/v1.25/Documentation/capabilities/getTectonCacheObject
Correction for extension 2:
— Michael Plohetski 3 years agovalue = self.cache.get(UNIQUE_KEY)As far as I know it is on a per service basis. So you should be able to use it across your extensions exactly as you have it there. If it needs to be tied to a specific session I recommend using self.session_cache.
— Trey Teter 3 years ago