saving active users userid not working
Hi,
I have a create service that runs some javascript to create a record. It all works except for one mapping: the userid of the logged in user (stored in local variable = UserID. I tried the following javascript, which I think should work:
var UserID = localStorage.getItem('UserID');
return '{"collName": "users", "id": "' + UserID + '"}';
When I test it in the createservice window using:
{"collName": "users", "id": "5389cb82e4b0a73d895c8844"} (having replaced the UserID variable with an actual _id, it works. I also know the .getItem call is working, because I can see it if I put it in an alert.
I have tried setting it up with a mapping and using "'+ value +'" and also without the mapping, with the .getItem call....