Sign In Register

How can we help you today?

Start a new topic

scriptData does not persist between Request and Response cloud code

According to this the docs, one should be able to use setScriptData in the Request handler and retrieve that with getScriptData in the Response handler. I'm finding that I only get null in the Response handler. Specifically, I'm looking at DeviceAuthenticationRequest and AuthenticationResponse.

I tried to test with a fresh Request+Response pair: AccountDetailsRequest. Appears that AccountDetailsResponse is called, but AccountDetailsRequest is never triggered (in the Test Harness with Debug Requests checked, it doesn't debug).

Tested with ListAchievements*. Both scripts get triggered at least, but still experiencing the same behaviour: getScriptData returns null.

Okay, I figured it out. You set it in the request with setUserData(key, value) and get it with getData().key.

VERY confusing and underdocumented.

We're about to begin a major overhaul to our documentation Nick.
I've added a note about what you mentioned re the scriptdata specifically.



Login to post a comment